166 lines
4.4 KiB
Go
166 lines
4.4 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"
|
|
)
|
|
|
|
// ClusterLayout struct for ClusterLayout
|
|
type ClusterLayout struct {
|
|
Version int32 `json:"version"`
|
|
Roles []NodeClusterInfo `json:"roles"`
|
|
StagedRoleChanges []NodeRoleChange `json:"stagedRoleChanges"`
|
|
}
|
|
|
|
// NewClusterLayout instantiates a new ClusterLayout 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 NewClusterLayout(version int32, roles []NodeClusterInfo, stagedRoleChanges []NodeRoleChange) *ClusterLayout {
|
|
this := ClusterLayout{}
|
|
this.Version = version
|
|
this.Roles = roles
|
|
this.StagedRoleChanges = stagedRoleChanges
|
|
return &this
|
|
}
|
|
|
|
// NewClusterLayoutWithDefaults instantiates a new ClusterLayout 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 NewClusterLayoutWithDefaults() *ClusterLayout {
|
|
this := ClusterLayout{}
|
|
return &this
|
|
}
|
|
|
|
// GetVersion returns the Version field value
|
|
func (o *ClusterLayout) GetVersion() int32 {
|
|
if o == nil {
|
|
var ret int32
|
|
return ret
|
|
}
|
|
|
|
return o.Version
|
|
}
|
|
|
|
// GetVersionOk returns a tuple with the Version field value
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ClusterLayout) GetVersionOk() (*int32, bool) {
|
|
if o == nil {
|
|
return nil, false
|
|
}
|
|
return &o.Version, true
|
|
}
|
|
|
|
// SetVersion sets field value
|
|
func (o *ClusterLayout) SetVersion(v int32) {
|
|
o.Version = v
|
|
}
|
|
|
|
// GetRoles returns the Roles field value
|
|
func (o *ClusterLayout) GetRoles() []NodeClusterInfo {
|
|
if o == nil {
|
|
var ret []NodeClusterInfo
|
|
return ret
|
|
}
|
|
|
|
return o.Roles
|
|
}
|
|
|
|
// GetRolesOk returns a tuple with the Roles field value
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ClusterLayout) GetRolesOk() ([]NodeClusterInfo, bool) {
|
|
if o == nil {
|
|
return nil, false
|
|
}
|
|
return o.Roles, true
|
|
}
|
|
|
|
// SetRoles sets field value
|
|
func (o *ClusterLayout) SetRoles(v []NodeClusterInfo) {
|
|
o.Roles = v
|
|
}
|
|
|
|
// GetStagedRoleChanges returns the StagedRoleChanges field value
|
|
func (o *ClusterLayout) GetStagedRoleChanges() []NodeRoleChange {
|
|
if o == nil {
|
|
var ret []NodeRoleChange
|
|
return ret
|
|
}
|
|
|
|
return o.StagedRoleChanges
|
|
}
|
|
|
|
// GetStagedRoleChangesOk returns a tuple with the StagedRoleChanges field value
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ClusterLayout) GetStagedRoleChangesOk() ([]NodeRoleChange, bool) {
|
|
if o == nil {
|
|
return nil, false
|
|
}
|
|
return o.StagedRoleChanges, true
|
|
}
|
|
|
|
// SetStagedRoleChanges sets field value
|
|
func (o *ClusterLayout) SetStagedRoleChanges(v []NodeRoleChange) {
|
|
o.StagedRoleChanges = v
|
|
}
|
|
|
|
func (o ClusterLayout) MarshalJSON() ([]byte, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if true {
|
|
toSerialize["version"] = o.Version
|
|
}
|
|
if true {
|
|
toSerialize["roles"] = o.Roles
|
|
}
|
|
if true {
|
|
toSerialize["stagedRoleChanges"] = o.StagedRoleChanges
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
type NullableClusterLayout struct {
|
|
value *ClusterLayout
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableClusterLayout) Get() *ClusterLayout {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableClusterLayout) Set(val *ClusterLayout) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableClusterLayout) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableClusterLayout) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableClusterLayout(val *ClusterLayout) *NullableClusterLayout {
|
|
return &NullableClusterLayout{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableClusterLayout) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableClusterLayout) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|
|
|
|
|