garage-admin-sdk-golang/model_layout_version.go

116 lines
3.2 KiB
Go
Raw Normal View History

2022-11-13 13:22:00 +00:00
/*
2023-11-22 17:28:14 +00:00
Garage Administration API v0+garage-v0.9.0
2022-11-13 13:22:00 +00:00
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!*
2023-11-22 17:28:14 +00:00
API version: v0.9.0
2022-11-13 13:22:00 +00:00
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package garage
import (
"encoding/json"
)
// LayoutVersion struct for LayoutVersion
type LayoutVersion struct {
Version *int32 `json:"version,omitempty"`
}
// NewLayoutVersion instantiates a new LayoutVersion 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 NewLayoutVersion() *LayoutVersion {
this := LayoutVersion{}
return &this
}
// NewLayoutVersionWithDefaults instantiates a new LayoutVersion 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 NewLayoutVersionWithDefaults() *LayoutVersion {
this := LayoutVersion{}
return &this
}
// GetVersion returns the Version field value if set, zero value otherwise.
func (o *LayoutVersion) GetVersion() int32 {
if o == nil || o.Version == nil {
var ret int32
return ret
}
return *o.Version
}
// GetVersionOk returns a tuple with the Version field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *LayoutVersion) GetVersionOk() (*int32, bool) {
if o == nil || o.Version == nil {
return nil, false
}
return o.Version, true
}
// HasVersion returns a boolean if a field has been set.
func (o *LayoutVersion) HasVersion() bool {
if o != nil && o.Version != nil {
return true
}
return false
}
// SetVersion gets a reference to the given int32 and assigns it to the Version field.
func (o *LayoutVersion) SetVersion(v int32) {
o.Version = &v
}
func (o LayoutVersion) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if o.Version != nil {
toSerialize["version"] = o.Version
}
return json.Marshal(toSerialize)
}
type NullableLayoutVersion struct {
value *LayoutVersion
isSet bool
}
func (v NullableLayoutVersion) Get() *LayoutVersion {
return v.value
}
func (v *NullableLayoutVersion) Set(val *LayoutVersion) {
v.value = val
v.isSet = true
}
func (v NullableLayoutVersion) IsSet() bool {
return v.isSet
}
func (v *NullableLayoutVersion) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableLayoutVersion(val *LayoutVersion) *NullableLayoutVersion {
return &NullableLayoutVersion{value: val, isSet: true}
}
func (v NullableLayoutVersion) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableLayoutVersion) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}