/* Garage Administration API v0+garage-v0.9.0 Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!* API version: v0.9.0 */ // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. package garage import ( "encoding/json" ) // NodeRoleUpdate struct for NodeRoleUpdate type NodeRoleUpdate struct { Id *string `json:"id,omitempty"` Zone string `json:"zone"` Capacity NullableInt32 `json:"capacity"` Tags []string `json:"tags"` } // NewNodeRoleUpdate instantiates a new NodeRoleUpdate 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 NewNodeRoleUpdate(zone string, capacity NullableInt32, tags []string) *NodeRoleUpdate { this := NodeRoleUpdate{} this.Zone = zone this.Capacity = capacity this.Tags = tags return &this } // NewNodeRoleUpdateWithDefaults instantiates a new NodeRoleUpdate 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 NewNodeRoleUpdateWithDefaults() *NodeRoleUpdate { this := NodeRoleUpdate{} return &this } // GetId returns the Id field value if set, zero value otherwise. func (o *NodeRoleUpdate) GetId() string { if o == nil || o.Id == nil { var ret string return ret } return *o.Id } // GetIdOk returns a tuple with the Id field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *NodeRoleUpdate) GetIdOk() (*string, bool) { if o == nil || o.Id == nil { return nil, false } return o.Id, true } // HasId returns a boolean if a field has been set. func (o *NodeRoleUpdate) HasId() bool { if o != nil && o.Id != nil { return true } return false } // SetId gets a reference to the given string and assigns it to the Id field. func (o *NodeRoleUpdate) SetId(v string) { o.Id = &v } // GetZone returns the Zone field value func (o *NodeRoleUpdate) GetZone() string { if o == nil { var ret string return ret } return o.Zone } // GetZoneOk returns a tuple with the Zone field value // and a boolean to check if the value has been set. func (o *NodeRoleUpdate) GetZoneOk() (*string, bool) { if o == nil { return nil, false } return &o.Zone, true } // SetZone sets field value func (o *NodeRoleUpdate) SetZone(v string) { o.Zone = v } // GetCapacity returns the Capacity field value // If the value is explicit nil, the zero value for int32 will be returned func (o *NodeRoleUpdate) GetCapacity() int32 { if o == nil || o.Capacity.Get() == nil { var ret int32 return ret } return *o.Capacity.Get() } // GetCapacityOk returns a tuple with the Capacity field value // and a boolean to check if the value has been set. // NOTE: If the value is an explicit nil, `nil, true` will be returned func (o *NodeRoleUpdate) GetCapacityOk() (*int32, bool) { if o == nil { return nil, false } return o.Capacity.Get(), o.Capacity.IsSet() } // SetCapacity sets field value func (o *NodeRoleUpdate) SetCapacity(v int32) { o.Capacity.Set(&v) } // GetTags returns the Tags field value func (o *NodeRoleUpdate) GetTags() []string { if o == nil { var ret []string return ret } return o.Tags } // GetTagsOk returns a tuple with the Tags field value // and a boolean to check if the value has been set. func (o *NodeRoleUpdate) GetTagsOk() ([]string, bool) { if o == nil { return nil, false } return o.Tags, true } // SetTags sets field value func (o *NodeRoleUpdate) SetTags(v []string) { o.Tags = v } func (o NodeRoleUpdate) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Id != nil { toSerialize["id"] = o.Id } if true { toSerialize["zone"] = o.Zone } if true { toSerialize["capacity"] = o.Capacity.Get() } if true { toSerialize["tags"] = o.Tags } return json.Marshal(toSerialize) } type NullableNodeRoleUpdate struct { value *NodeRoleUpdate isSet bool } func (v NullableNodeRoleUpdate) Get() *NodeRoleUpdate { return v.value } func (v *NullableNodeRoleUpdate) Set(val *NodeRoleUpdate) { v.value = val v.isSet = true } func (v NullableNodeRoleUpdate) IsSet() bool { return v.isSet } func (v *NullableNodeRoleUpdate) Unset() { v.value = nil v.isSet = false } func NewNullableNodeRoleUpdate(val *NodeRoleUpdate) *NullableNodeRoleUpdate { return &NullableNodeRoleUpdate{value: val, isSet: true} } func (v NullableNodeRoleUpdate) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableNodeRoleUpdate) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) }