169 lines
4.4 KiB
Go
169 lines
4.4 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"
|
|
)
|
|
|
|
// NodeClusterInfo struct for NodeClusterInfo
|
|
type NodeClusterInfo struct {
|
|
Zone string `json:"zone"`
|
|
Capacity NullableInt32 `json:"capacity"`
|
|
// User defined tags, put whatever makes sense for you, these tags are not interpreted by Garage
|
|
Tags []string `json:"tags"`
|
|
}
|
|
|
|
// NewNodeClusterInfo instantiates a new NodeClusterInfo 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 NewNodeClusterInfo(zone string, capacity NullableInt32, tags []string) *NodeClusterInfo {
|
|
this := NodeClusterInfo{}
|
|
this.Zone = zone
|
|
this.Capacity = capacity
|
|
this.Tags = tags
|
|
return &this
|
|
}
|
|
|
|
// NewNodeClusterInfoWithDefaults instantiates a new NodeClusterInfo 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 NewNodeClusterInfoWithDefaults() *NodeClusterInfo {
|
|
this := NodeClusterInfo{}
|
|
return &this
|
|
}
|
|
|
|
// GetZone returns the Zone field value
|
|
func (o *NodeClusterInfo) GetZone() string {
|
|
if o == nil {
|
|
var ret string
|
|
return ret
|
|
}
|
|
|
|
return o.Zone
|
|
}
|
|
|
|
// GetZoneOk returns a tuple with the Zone field value
|
|
// and a boolean to check if the value has been set.
|
|
func (o *NodeClusterInfo) GetZoneOk() (*string, bool) {
|
|
if o == nil {
|
|
return nil, false
|
|
}
|
|
return &o.Zone, true
|
|
}
|
|
|
|
// SetZone sets field value
|
|
func (o *NodeClusterInfo) SetZone(v string) {
|
|
o.Zone = v
|
|
}
|
|
|
|
// GetCapacity returns the Capacity field value
|
|
// If the value is explicit nil, the zero value for int32 will be returned
|
|
func (o *NodeClusterInfo) GetCapacity() int32 {
|
|
if o == nil || o.Capacity.Get() == nil {
|
|
var ret int32
|
|
return ret
|
|
}
|
|
|
|
return *o.Capacity.Get()
|
|
}
|
|
|
|
// GetCapacityOk returns a tuple with the Capacity field value
|
|
// and a boolean to check if the value has been set.
|
|
// NOTE: If the value is an explicit nil, `nil, true` will be returned
|
|
func (o *NodeClusterInfo) GetCapacityOk() (*int32, bool) {
|
|
if o == nil {
|
|
return nil, false
|
|
}
|
|
return o.Capacity.Get(), o.Capacity.IsSet()
|
|
}
|
|
|
|
// SetCapacity sets field value
|
|
func (o *NodeClusterInfo) SetCapacity(v int32) {
|
|
o.Capacity.Set(&v)
|
|
}
|
|
|
|
// GetTags returns the Tags field value
|
|
func (o *NodeClusterInfo) GetTags() []string {
|
|
if o == nil {
|
|
var ret []string
|
|
return ret
|
|
}
|
|
|
|
return o.Tags
|
|
}
|
|
|
|
// GetTagsOk returns a tuple with the Tags field value
|
|
// and a boolean to check if the value has been set.
|
|
func (o *NodeClusterInfo) GetTagsOk() ([]string, bool) {
|
|
if o == nil {
|
|
return nil, false
|
|
}
|
|
return o.Tags, true
|
|
}
|
|
|
|
// SetTags sets field value
|
|
func (o *NodeClusterInfo) SetTags(v []string) {
|
|
o.Tags = v
|
|
}
|
|
|
|
func (o NodeClusterInfo) MarshalJSON() ([]byte, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if true {
|
|
toSerialize["zone"] = o.Zone
|
|
}
|
|
if true {
|
|
toSerialize["capacity"] = o.Capacity.Get()
|
|
}
|
|
if true {
|
|
toSerialize["tags"] = o.Tags
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
type NullableNodeClusterInfo struct {
|
|
value *NodeClusterInfo
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableNodeClusterInfo) Get() *NodeClusterInfo {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableNodeClusterInfo) Set(val *NodeClusterInfo) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableNodeClusterInfo) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableNodeClusterInfo) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableNodeClusterInfo(val *NodeClusterInfo) *NullableNodeClusterInfo {
|
|
return &NullableNodeClusterInfo{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableNodeClusterInfo) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableNodeClusterInfo) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|
|
|
|
|