garage-admin-sdk-golang/model_node_role_remove.go

144 lines
3.7 KiB
Go

/*
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"
)
// NodeRoleRemove struct for NodeRoleRemove
type NodeRoleRemove struct {
Id *string `json:"id,omitempty"`
Remove bool `json:"remove"`
}
// NewNodeRoleRemove instantiates a new NodeRoleRemove 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 NewNodeRoleRemove(remove bool) *NodeRoleRemove {
this := NodeRoleRemove{}
this.Remove = remove
return &this
}
// NewNodeRoleRemoveWithDefaults instantiates a new NodeRoleRemove 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 NewNodeRoleRemoveWithDefaults() *NodeRoleRemove {
this := NodeRoleRemove{}
return &this
}
// GetId returns the Id field value if set, zero value otherwise.
func (o *NodeRoleRemove) 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 *NodeRoleRemove) 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 *NodeRoleRemove) 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 *NodeRoleRemove) SetId(v string) {
o.Id = &v
}
// GetRemove returns the Remove field value
func (o *NodeRoleRemove) GetRemove() bool {
if o == nil {
var ret bool
return ret
}
return o.Remove
}
// GetRemoveOk returns a tuple with the Remove field value
// and a boolean to check if the value has been set.
func (o *NodeRoleRemove) GetRemoveOk() (*bool, bool) {
if o == nil {
return nil, false
}
return &o.Remove, true
}
// SetRemove sets field value
func (o *NodeRoleRemove) SetRemove(v bool) {
o.Remove = v
}
func (o NodeRoleRemove) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if o.Id != nil {
toSerialize["id"] = o.Id
}
if true {
toSerialize["remove"] = o.Remove
}
return json.Marshal(toSerialize)
}
type NullableNodeRoleRemove struct {
value *NodeRoleRemove
isSet bool
}
func (v NullableNodeRoleRemove) Get() *NodeRoleRemove {
return v.value
}
func (v *NullableNodeRoleRemove) Set(val *NodeRoleRemove) {
v.value = val
v.isSet = true
}
func (v NullableNodeRoleRemove) IsSet() bool {
return v.isSet
}
func (v *NullableNodeRoleRemove) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableNodeRoleRemove(val *NodeRoleRemove) *NullableNodeRoleRemove {
return &NullableNodeRoleRemove{value: val, isSet: true}
}
func (v NullableNodeRoleRemove) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableNodeRoleRemove) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}