garage-admin-sdk-golang/model_create_bucket_request_local_alias.go

187 lines
5.8 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"
)
// CreateBucketRequestLocalAlias struct for CreateBucketRequestLocalAlias
type CreateBucketRequestLocalAlias struct {
AccessKeyId *string `json:"accessKeyId,omitempty"`
Alias *string `json:"alias,omitempty"`
Allow *CreateBucketRequestLocalAliasAllow `json:"allow,omitempty"`
}
// NewCreateBucketRequestLocalAlias instantiates a new CreateBucketRequestLocalAlias 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 NewCreateBucketRequestLocalAlias() *CreateBucketRequestLocalAlias {
this := CreateBucketRequestLocalAlias{}
return &this
}
// NewCreateBucketRequestLocalAliasWithDefaults instantiates a new CreateBucketRequestLocalAlias 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 NewCreateBucketRequestLocalAliasWithDefaults() *CreateBucketRequestLocalAlias {
this := CreateBucketRequestLocalAlias{}
return &this
}
// GetAccessKeyId returns the AccessKeyId field value if set, zero value otherwise.
func (o *CreateBucketRequestLocalAlias) GetAccessKeyId() string {
if o == nil || o.AccessKeyId == nil {
var ret string
return ret
}
return *o.AccessKeyId
}
// GetAccessKeyIdOk returns a tuple with the AccessKeyId field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CreateBucketRequestLocalAlias) GetAccessKeyIdOk() (*string, bool) {
if o == nil || o.AccessKeyId == nil {
return nil, false
}
return o.AccessKeyId, true
}
// HasAccessKeyId returns a boolean if a field has been set.
func (o *CreateBucketRequestLocalAlias) HasAccessKeyId() bool {
if o != nil && o.AccessKeyId != nil {
return true
}
return false
}
// SetAccessKeyId gets a reference to the given string and assigns it to the AccessKeyId field.
func (o *CreateBucketRequestLocalAlias) SetAccessKeyId(v string) {
o.AccessKeyId = &v
}
// GetAlias returns the Alias field value if set, zero value otherwise.
func (o *CreateBucketRequestLocalAlias) GetAlias() string {
if o == nil || o.Alias == nil {
var ret string
return ret
}
return *o.Alias
}
// GetAliasOk returns a tuple with the Alias field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CreateBucketRequestLocalAlias) GetAliasOk() (*string, bool) {
if o == nil || o.Alias == nil {
return nil, false
}
return o.Alias, true
}
// HasAlias returns a boolean if a field has been set.
func (o *CreateBucketRequestLocalAlias) HasAlias() bool {
if o != nil && o.Alias != nil {
return true
}
return false
}
// SetAlias gets a reference to the given string and assigns it to the Alias field.
func (o *CreateBucketRequestLocalAlias) SetAlias(v string) {
o.Alias = &v
}
// GetAllow returns the Allow field value if set, zero value otherwise.
func (o *CreateBucketRequestLocalAlias) GetAllow() CreateBucketRequestLocalAliasAllow {
if o == nil || o.Allow == nil {
var ret CreateBucketRequestLocalAliasAllow
return ret
}
return *o.Allow
}
// GetAllowOk returns a tuple with the Allow field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CreateBucketRequestLocalAlias) GetAllowOk() (*CreateBucketRequestLocalAliasAllow, bool) {
if o == nil || o.Allow == nil {
return nil, false
}
return o.Allow, true
}
// HasAllow returns a boolean if a field has been set.
func (o *CreateBucketRequestLocalAlias) HasAllow() bool {
if o != nil && o.Allow != nil {
return true
}
return false
}
// SetAllow gets a reference to the given CreateBucketRequestLocalAliasAllow and assigns it to the Allow field.
func (o *CreateBucketRequestLocalAlias) SetAllow(v CreateBucketRequestLocalAliasAllow) {
o.Allow = &v
}
func (o CreateBucketRequestLocalAlias) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if o.AccessKeyId != nil {
toSerialize["accessKeyId"] = o.AccessKeyId
}
if o.Alias != nil {
toSerialize["alias"] = o.Alias
}
if o.Allow != nil {
toSerialize["allow"] = o.Allow
}
return json.Marshal(toSerialize)
}
type NullableCreateBucketRequestLocalAlias struct {
value *CreateBucketRequestLocalAlias
isSet bool
}
func (v NullableCreateBucketRequestLocalAlias) Get() *CreateBucketRequestLocalAlias {
return v.value
}
func (v *NullableCreateBucketRequestLocalAlias) Set(val *CreateBucketRequestLocalAlias) {
v.value = val
v.isSet = true
}
func (v NullableCreateBucketRequestLocalAlias) IsSet() bool {
return v.isSet
}
func (v *NullableCreateBucketRequestLocalAlias) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableCreateBucketRequestLocalAlias(val *CreateBucketRequestLocalAlias) *NullableCreateBucketRequestLocalAlias {
return &NullableCreateBucketRequestLocalAlias{value: val, isSet: true}
}
func (v NullableCreateBucketRequestLocalAlias) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableCreateBucketRequestLocalAlias) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}