garage-admin-sdk-golang/model_update_key_request_al...

116 lines
3.5 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"
)
// UpdateKeyRequestAllow struct for UpdateKeyRequestAllow
type UpdateKeyRequestAllow struct {
CreateBucket *bool `json:"createBucket,omitempty"`
}
// NewUpdateKeyRequestAllow instantiates a new UpdateKeyRequestAllow 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 NewUpdateKeyRequestAllow() *UpdateKeyRequestAllow {
this := UpdateKeyRequestAllow{}
return &this
}
// NewUpdateKeyRequestAllowWithDefaults instantiates a new UpdateKeyRequestAllow 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 NewUpdateKeyRequestAllowWithDefaults() *UpdateKeyRequestAllow {
this := UpdateKeyRequestAllow{}
return &this
}
// GetCreateBucket returns the CreateBucket field value if set, zero value otherwise.
func (o *UpdateKeyRequestAllow) GetCreateBucket() bool {
if o == nil || o.CreateBucket == nil {
var ret bool
return ret
}
return *o.CreateBucket
}
// GetCreateBucketOk returns a tuple with the CreateBucket field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *UpdateKeyRequestAllow) GetCreateBucketOk() (*bool, bool) {
if o == nil || o.CreateBucket == nil {
return nil, false
}
return o.CreateBucket, true
}
// HasCreateBucket returns a boolean if a field has been set.
func (o *UpdateKeyRequestAllow) HasCreateBucket() bool {
if o != nil && o.CreateBucket != nil {
return true
}
return false
}
// SetCreateBucket gets a reference to the given bool and assigns it to the CreateBucket field.
func (o *UpdateKeyRequestAllow) SetCreateBucket(v bool) {
o.CreateBucket = &v
}
func (o UpdateKeyRequestAllow) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if o.CreateBucket != nil {
toSerialize["createBucket"] = o.CreateBucket
}
return json.Marshal(toSerialize)
}
type NullableUpdateKeyRequestAllow struct {
value *UpdateKeyRequestAllow
isSet bool
}
func (v NullableUpdateKeyRequestAllow) Get() *UpdateKeyRequestAllow {
return v.value
}
func (v *NullableUpdateKeyRequestAllow) Set(val *UpdateKeyRequestAllow) {
v.value = val
v.isSet = true
}
func (v NullableUpdateKeyRequestAllow) IsSet() bool {
return v.isSet
}
func (v *NullableUpdateKeyRequestAllow) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableUpdateKeyRequestAllow(val *UpdateKeyRequestAllow) *NullableUpdateKeyRequestAllow {
return &NullableUpdateKeyRequestAllow{value: val, isSet: true}
}
func (v NullableUpdateKeyRequestAllow) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableUpdateKeyRequestAllow) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}