garage-admin-sdk-golang/model_create_bucket_request.go

152 lines
4.6 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"
)
// CreateBucketRequest struct for CreateBucketRequest
type CreateBucketRequest struct {
GlobalAlias *string `json:"globalAlias,omitempty"`
LocalAlias *CreateBucketRequestLocalAlias `json:"localAlias,omitempty"`
}
// NewCreateBucketRequest instantiates a new CreateBucketRequest 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 NewCreateBucketRequest() *CreateBucketRequest {
this := CreateBucketRequest{}
return &this
}
// NewCreateBucketRequestWithDefaults instantiates a new CreateBucketRequest 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 NewCreateBucketRequestWithDefaults() *CreateBucketRequest {
this := CreateBucketRequest{}
return &this
}
// GetGlobalAlias returns the GlobalAlias field value if set, zero value otherwise.
func (o *CreateBucketRequest) GetGlobalAlias() string {
if o == nil || o.GlobalAlias == nil {
var ret string
return ret
}
return *o.GlobalAlias
}
// GetGlobalAliasOk returns a tuple with the GlobalAlias field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CreateBucketRequest) GetGlobalAliasOk() (*string, bool) {
if o == nil || o.GlobalAlias == nil {
return nil, false
}
return o.GlobalAlias, true
}
// HasGlobalAlias returns a boolean if a field has been set.
func (o *CreateBucketRequest) HasGlobalAlias() bool {
if o != nil && o.GlobalAlias != nil {
return true
}
return false
}
// SetGlobalAlias gets a reference to the given string and assigns it to the GlobalAlias field.
func (o *CreateBucketRequest) SetGlobalAlias(v string) {
o.GlobalAlias = &v
}
// GetLocalAlias returns the LocalAlias field value if set, zero value otherwise.
func (o *CreateBucketRequest) GetLocalAlias() CreateBucketRequestLocalAlias {
if o == nil || o.LocalAlias == nil {
var ret CreateBucketRequestLocalAlias
return ret
}
return *o.LocalAlias
}
// GetLocalAliasOk returns a tuple with the LocalAlias field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CreateBucketRequest) GetLocalAliasOk() (*CreateBucketRequestLocalAlias, bool) {
if o == nil || o.LocalAlias == nil {
return nil, false
}
return o.LocalAlias, true
}
// HasLocalAlias returns a boolean if a field has been set.
func (o *CreateBucketRequest) HasLocalAlias() bool {
if o != nil && o.LocalAlias != nil {
return true
}
return false
}
// SetLocalAlias gets a reference to the given CreateBucketRequestLocalAlias and assigns it to the LocalAlias field.
func (o *CreateBucketRequest) SetLocalAlias(v CreateBucketRequestLocalAlias) {
o.LocalAlias = &v
}
func (o CreateBucketRequest) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if o.GlobalAlias != nil {
toSerialize["globalAlias"] = o.GlobalAlias
}
if o.LocalAlias != nil {
toSerialize["localAlias"] = o.LocalAlias
}
return json.Marshal(toSerialize)
}
type NullableCreateBucketRequest struct {
value *CreateBucketRequest
isSet bool
}
func (v NullableCreateBucketRequest) Get() *CreateBucketRequest {
return v.value
}
func (v *NullableCreateBucketRequest) Set(val *CreateBucketRequest) {
v.value = val
v.isSet = true
}
func (v NullableCreateBucketRequest) IsSet() bool {
return v.isSet
}
func (v *NullableCreateBucketRequest) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableCreateBucketRequest(val *CreateBucketRequest) *NullableCreateBucketRequest {
return &NullableCreateBucketRequest{value: val, isSet: true}
}
func (v NullableCreateBucketRequest) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableCreateBucketRequest) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}