garage-admin-sdk-golang/model_update_bucket_request.go

152 lines
4.7 KiB
Go

/*
Garage Administration API v0+garage-v0.8.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.8.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package garage
import (
"encoding/json"
)
// UpdateBucketRequest struct for UpdateBucketRequest
type UpdateBucketRequest struct {
WebsiteAccess *UpdateBucketRequestWebsiteAccess `json:"websiteAccess,omitempty"`
Quotas *UpdateBucketRequestQuotas `json:"quotas,omitempty"`
}
// NewUpdateBucketRequest instantiates a new UpdateBucketRequest 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 NewUpdateBucketRequest() *UpdateBucketRequest {
this := UpdateBucketRequest{}
return &this
}
// NewUpdateBucketRequestWithDefaults instantiates a new UpdateBucketRequest 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 NewUpdateBucketRequestWithDefaults() *UpdateBucketRequest {
this := UpdateBucketRequest{}
return &this
}
// GetWebsiteAccess returns the WebsiteAccess field value if set, zero value otherwise.
func (o *UpdateBucketRequest) GetWebsiteAccess() UpdateBucketRequestWebsiteAccess {
if o == nil || o.WebsiteAccess == nil {
var ret UpdateBucketRequestWebsiteAccess
return ret
}
return *o.WebsiteAccess
}
// GetWebsiteAccessOk returns a tuple with the WebsiteAccess field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *UpdateBucketRequest) GetWebsiteAccessOk() (*UpdateBucketRequestWebsiteAccess, bool) {
if o == nil || o.WebsiteAccess == nil {
return nil, false
}
return o.WebsiteAccess, true
}
// HasWebsiteAccess returns a boolean if a field has been set.
func (o *UpdateBucketRequest) HasWebsiteAccess() bool {
if o != nil && o.WebsiteAccess != nil {
return true
}
return false
}
// SetWebsiteAccess gets a reference to the given UpdateBucketRequestWebsiteAccess and assigns it to the WebsiteAccess field.
func (o *UpdateBucketRequest) SetWebsiteAccess(v UpdateBucketRequestWebsiteAccess) {
o.WebsiteAccess = &v
}
// GetQuotas returns the Quotas field value if set, zero value otherwise.
func (o *UpdateBucketRequest) GetQuotas() UpdateBucketRequestQuotas {
if o == nil || o.Quotas == nil {
var ret UpdateBucketRequestQuotas
return ret
}
return *o.Quotas
}
// GetQuotasOk returns a tuple with the Quotas field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *UpdateBucketRequest) GetQuotasOk() (*UpdateBucketRequestQuotas, bool) {
if o == nil || o.Quotas == nil {
return nil, false
}
return o.Quotas, true
}
// HasQuotas returns a boolean if a field has been set.
func (o *UpdateBucketRequest) HasQuotas() bool {
if o != nil && o.Quotas != nil {
return true
}
return false
}
// SetQuotas gets a reference to the given UpdateBucketRequestQuotas and assigns it to the Quotas field.
func (o *UpdateBucketRequest) SetQuotas(v UpdateBucketRequestQuotas) {
o.Quotas = &v
}
func (o UpdateBucketRequest) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if o.WebsiteAccess != nil {
toSerialize["websiteAccess"] = o.WebsiteAccess
}
if o.Quotas != nil {
toSerialize["quotas"] = o.Quotas
}
return json.Marshal(toSerialize)
}
type NullableUpdateBucketRequest struct {
value *UpdateBucketRequest
isSet bool
}
func (v NullableUpdateBucketRequest) Get() *UpdateBucketRequest {
return v.value
}
func (v *NullableUpdateBucketRequest) Set(val *UpdateBucketRequest) {
v.value = val
v.isSet = true
}
func (v NullableUpdateBucketRequest) IsSet() bool {
return v.isSet
}
func (v *NullableUpdateBucketRequest) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableUpdateBucketRequest(val *UpdateBucketRequest) *NullableUpdateBucketRequest {
return &NullableUpdateBucketRequest{value: val, isSet: true}
}
func (v NullableUpdateBucketRequest) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableUpdateBucketRequest) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}