garage-admin-sdk-golang/model_key_info_permissions.go

115 lines
3.4 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"
)
// KeyInfoPermissions struct for KeyInfoPermissions
type KeyInfoPermissions struct {
CreateBucket *bool `json:"createBucket,omitempty"`
}
// NewKeyInfoPermissions instantiates a new KeyInfoPermissions 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 NewKeyInfoPermissions() *KeyInfoPermissions {
this := KeyInfoPermissions{}
return &this
}
// NewKeyInfoPermissionsWithDefaults instantiates a new KeyInfoPermissions 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 NewKeyInfoPermissionsWithDefaults() *KeyInfoPermissions {
this := KeyInfoPermissions{}
return &this
}
// GetCreateBucket returns the CreateBucket field value if set, zero value otherwise.
func (o *KeyInfoPermissions) 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 *KeyInfoPermissions) 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 *KeyInfoPermissions) 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 *KeyInfoPermissions) SetCreateBucket(v bool) {
o.CreateBucket = &v
}
func (o KeyInfoPermissions) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if o.CreateBucket != nil {
toSerialize["createBucket"] = o.CreateBucket
}
return json.Marshal(toSerialize)
}
type NullableKeyInfoPermissions struct {
value *KeyInfoPermissions
isSet bool
}
func (v NullableKeyInfoPermissions) Get() *KeyInfoPermissions {
return v.value
}
func (v *NullableKeyInfoPermissions) Set(val *KeyInfoPermissions) {
v.value = val
v.isSet = true
}
func (v NullableKeyInfoPermissions) IsSet() bool {
return v.isSet
}
func (v *NullableKeyInfoPermissions) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableKeyInfoPermissions(val *KeyInfoPermissions) *NullableKeyInfoPermissions {
return &NullableKeyInfoPermissions{value: val, isSet: true}
}
func (v NullableKeyInfoPermissions) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableKeyInfoPermissions) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}