Files
sdk/model_tool_authored_plugin_list.go

155 lines
4.4 KiB
Go

/*
Hanzo Cloud API
The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
API version: v1
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package hanzoai
import (
"encoding/json"
)
// checks if the ToolAuthoredPluginList type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &ToolAuthoredPluginList{}
// ToolAuthoredPluginList struct for ToolAuthoredPluginList
type ToolAuthoredPluginList struct {
// Plugins is every plugin this org built, newest first, each carrying the TypeScript as authored. The bundled artifact is never rendered.
Plugins []ToolAuthoredPlugin `json:"plugins,omitempty"`
AdditionalProperties map[string]interface{}
}
type _ToolAuthoredPluginList ToolAuthoredPluginList
// NewToolAuthoredPluginList instantiates a new ToolAuthoredPluginList object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewToolAuthoredPluginList() *ToolAuthoredPluginList {
this := ToolAuthoredPluginList{}
return &this
}
// NewToolAuthoredPluginListWithDefaults instantiates a new ToolAuthoredPluginList object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewToolAuthoredPluginListWithDefaults() *ToolAuthoredPluginList {
this := ToolAuthoredPluginList{}
return &this
}
// GetPlugins returns the Plugins field value if set, zero value otherwise.
func (o *ToolAuthoredPluginList) GetPlugins() []ToolAuthoredPlugin {
if o == nil || IsNil(o.Plugins) {
var ret []ToolAuthoredPlugin
return ret
}
return o.Plugins
}
// GetPluginsOk returns a tuple with the Plugins field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ToolAuthoredPluginList) GetPluginsOk() ([]ToolAuthoredPlugin, bool) {
if o == nil || IsNil(o.Plugins) {
return nil, false
}
return o.Plugins, true
}
// HasPlugins returns a boolean if a field has been set.
func (o *ToolAuthoredPluginList) HasPlugins() bool {
if o != nil && !IsNil(o.Plugins) {
return true
}
return false
}
// SetPlugins gets a reference to the given []ToolAuthoredPlugin and assigns it to the Plugins field.
func (o *ToolAuthoredPluginList) SetPlugins(v []ToolAuthoredPlugin) {
o.Plugins = v
}
func (o ToolAuthoredPluginList) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o ToolAuthoredPluginList) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Plugins) {
toSerialize["plugins"] = o.Plugins
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *ToolAuthoredPluginList) UnmarshalJSON(data []byte) (err error) {
varToolAuthoredPluginList := _ToolAuthoredPluginList{}
err = json.Unmarshal(data, &varToolAuthoredPluginList)
if err != nil {
return err
}
*o = ToolAuthoredPluginList(varToolAuthoredPluginList)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "plugins")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableToolAuthoredPluginList struct {
value *ToolAuthoredPluginList
isSet bool
}
func (v NullableToolAuthoredPluginList) Get() *ToolAuthoredPluginList {
return v.value
}
func (v *NullableToolAuthoredPluginList) Set(val *ToolAuthoredPluginList) {
v.value = val
v.isSet = true
}
func (v NullableToolAuthoredPluginList) IsSet() bool {
return v.isSet
}
func (v *NullableToolAuthoredPluginList) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableToolAuthoredPluginList(val *ToolAuthoredPluginList) *NullableToolAuthoredPluginList {
return &NullableToolAuthoredPluginList{value: val, isSet: true}
}
func (v NullableToolAuthoredPluginList) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableToolAuthoredPluginList) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}