garage-admin-sdk-golang/model_layout_version.go

109 lines
2.9 KiB
Go
Raw Permalink 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 {
2023-11-23 09:21:13 +00:00
Version int32 `json:"version"`
2022-11-13 13:22:00 +00:00
}
// 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
2023-11-23 09:21:13 +00:00
func NewLayoutVersion(version int32) *LayoutVersion {
2022-11-13 13:22:00 +00:00
this := LayoutVersion{}
2023-11-23 09:17:56 +00:00
this.Version = version
2022-11-13 13:22:00 +00:00
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
}
2023-11-23 09:17:56 +00:00
// GetVersion returns the Version field value
2023-11-23 09:21:13 +00:00
func (o *LayoutVersion) GetVersion() int32 {
2023-11-23 09:17:56 +00:00
if o == nil {
2023-11-23 09:21:13 +00:00
var ret int32
2022-11-13 13:22:00 +00:00
return ret
}
2023-11-23 09:17:56 +00:00
return o.Version
2022-11-13 13:22:00 +00:00
}
2023-11-23 09:17:56 +00:00
// GetVersionOk returns a tuple with the Version field value
2022-11-13 13:22:00 +00:00
// and a boolean to check if the value has been set.
2023-11-23 09:21:13 +00:00
func (o *LayoutVersion) GetVersionOk() (*int32, bool) {
2023-11-23 09:17:56 +00:00
if o == nil {
2022-11-13 13:22:00 +00:00
return nil, false
}
2023-11-23 09:17:56 +00:00
return &o.Version, true
2022-11-13 13:22:00 +00:00
}
2023-11-23 09:17:56 +00:00
// SetVersion sets field value
2023-11-23 09:21:13 +00:00
func (o *LayoutVersion) SetVersion(v int32) {
2023-11-23 09:17:56 +00:00
o.Version = v
2022-11-13 13:22:00 +00:00
}
func (o LayoutVersion) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
2023-11-23 09:17:56 +00:00
if true {
2022-11-13 13:22:00 +00:00
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)
}