mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
524 lines
16 KiB
Go
524 lines
16 KiB
Go
/*
|
|
Hanzo Cloud API
|
|
|
|
The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
|
|
|
|
API version: v1
|
|
*/
|
|
|
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
|
|
|
package hanzoai
|
|
|
|
import (
|
|
"encoding/json"
|
|
)
|
|
|
|
// checks if the O11yDaemonSetRecord type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &O11yDaemonSetRecord{}
|
|
|
|
// O11yDaemonSetRecord struct for O11yDaemonSetRecord
|
|
type O11yDaemonSetRecord struct {
|
|
CurrentNodes *int64 `json:"currentNodes,omitempty"`
|
|
DaemonSetCPU *float64 `json:"daemonSetCPU,omitempty"`
|
|
DaemonSetCPULimit *float64 `json:"daemonSetCPULimit,omitempty"`
|
|
DaemonSetCPURequest *float64 `json:"daemonSetCPURequest,omitempty"`
|
|
DaemonSetMemory *float64 `json:"daemonSetMemory,omitempty"`
|
|
DaemonSetMemoryLimit *float64 `json:"daemonSetMemoryLimit,omitempty"`
|
|
DaemonSetMemoryRequest *float64 `json:"daemonSetMemoryRequest,omitempty"`
|
|
DaemonSetName *string `json:"daemonSetName,omitempty"`
|
|
DesiredNodes *int64 `json:"desiredNodes,omitempty"`
|
|
Meta map[string]string `json:"meta,omitempty"`
|
|
PodCountsByPhase *O11yPodCountsByPhase `json:"podCountsByPhase,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _O11yDaemonSetRecord O11yDaemonSetRecord
|
|
|
|
// NewO11yDaemonSetRecord instantiates a new O11yDaemonSetRecord 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 NewO11yDaemonSetRecord() *O11yDaemonSetRecord {
|
|
this := O11yDaemonSetRecord{}
|
|
return &this
|
|
}
|
|
|
|
// NewO11yDaemonSetRecordWithDefaults instantiates a new O11yDaemonSetRecord 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 NewO11yDaemonSetRecordWithDefaults() *O11yDaemonSetRecord {
|
|
this := O11yDaemonSetRecord{}
|
|
return &this
|
|
}
|
|
|
|
// GetCurrentNodes returns the CurrentNodes field value if set, zero value otherwise.
|
|
func (o *O11yDaemonSetRecord) GetCurrentNodes() int64 {
|
|
if o == nil || IsNil(o.CurrentNodes) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.CurrentNodes
|
|
}
|
|
|
|
// GetCurrentNodesOk returns a tuple with the CurrentNodes field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *O11yDaemonSetRecord) GetCurrentNodesOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.CurrentNodes) {
|
|
return nil, false
|
|
}
|
|
return o.CurrentNodes, true
|
|
}
|
|
|
|
// HasCurrentNodes returns a boolean if a field has been set.
|
|
func (o *O11yDaemonSetRecord) HasCurrentNodes() bool {
|
|
if o != nil && !IsNil(o.CurrentNodes) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetCurrentNodes gets a reference to the given int64 and assigns it to the CurrentNodes field.
|
|
func (o *O11yDaemonSetRecord) SetCurrentNodes(v int64) {
|
|
o.CurrentNodes = &v
|
|
}
|
|
|
|
// GetDaemonSetCPU returns the DaemonSetCPU field value if set, zero value otherwise.
|
|
func (o *O11yDaemonSetRecord) GetDaemonSetCPU() float64 {
|
|
if o == nil || IsNil(o.DaemonSetCPU) {
|
|
var ret float64
|
|
return ret
|
|
}
|
|
return *o.DaemonSetCPU
|
|
}
|
|
|
|
// GetDaemonSetCPUOk returns a tuple with the DaemonSetCPU field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *O11yDaemonSetRecord) GetDaemonSetCPUOk() (*float64, bool) {
|
|
if o == nil || IsNil(o.DaemonSetCPU) {
|
|
return nil, false
|
|
}
|
|
return o.DaemonSetCPU, true
|
|
}
|
|
|
|
// HasDaemonSetCPU returns a boolean if a field has been set.
|
|
func (o *O11yDaemonSetRecord) HasDaemonSetCPU() bool {
|
|
if o != nil && !IsNil(o.DaemonSetCPU) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetDaemonSetCPU gets a reference to the given float64 and assigns it to the DaemonSetCPU field.
|
|
func (o *O11yDaemonSetRecord) SetDaemonSetCPU(v float64) {
|
|
o.DaemonSetCPU = &v
|
|
}
|
|
|
|
// GetDaemonSetCPULimit returns the DaemonSetCPULimit field value if set, zero value otherwise.
|
|
func (o *O11yDaemonSetRecord) GetDaemonSetCPULimit() float64 {
|
|
if o == nil || IsNil(o.DaemonSetCPULimit) {
|
|
var ret float64
|
|
return ret
|
|
}
|
|
return *o.DaemonSetCPULimit
|
|
}
|
|
|
|
// GetDaemonSetCPULimitOk returns a tuple with the DaemonSetCPULimit field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *O11yDaemonSetRecord) GetDaemonSetCPULimitOk() (*float64, bool) {
|
|
if o == nil || IsNil(o.DaemonSetCPULimit) {
|
|
return nil, false
|
|
}
|
|
return o.DaemonSetCPULimit, true
|
|
}
|
|
|
|
// HasDaemonSetCPULimit returns a boolean if a field has been set.
|
|
func (o *O11yDaemonSetRecord) HasDaemonSetCPULimit() bool {
|
|
if o != nil && !IsNil(o.DaemonSetCPULimit) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetDaemonSetCPULimit gets a reference to the given float64 and assigns it to the DaemonSetCPULimit field.
|
|
func (o *O11yDaemonSetRecord) SetDaemonSetCPULimit(v float64) {
|
|
o.DaemonSetCPULimit = &v
|
|
}
|
|
|
|
// GetDaemonSetCPURequest returns the DaemonSetCPURequest field value if set, zero value otherwise.
|
|
func (o *O11yDaemonSetRecord) GetDaemonSetCPURequest() float64 {
|
|
if o == nil || IsNil(o.DaemonSetCPURequest) {
|
|
var ret float64
|
|
return ret
|
|
}
|
|
return *o.DaemonSetCPURequest
|
|
}
|
|
|
|
// GetDaemonSetCPURequestOk returns a tuple with the DaemonSetCPURequest field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *O11yDaemonSetRecord) GetDaemonSetCPURequestOk() (*float64, bool) {
|
|
if o == nil || IsNil(o.DaemonSetCPURequest) {
|
|
return nil, false
|
|
}
|
|
return o.DaemonSetCPURequest, true
|
|
}
|
|
|
|
// HasDaemonSetCPURequest returns a boolean if a field has been set.
|
|
func (o *O11yDaemonSetRecord) HasDaemonSetCPURequest() bool {
|
|
if o != nil && !IsNil(o.DaemonSetCPURequest) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetDaemonSetCPURequest gets a reference to the given float64 and assigns it to the DaemonSetCPURequest field.
|
|
func (o *O11yDaemonSetRecord) SetDaemonSetCPURequest(v float64) {
|
|
o.DaemonSetCPURequest = &v
|
|
}
|
|
|
|
// GetDaemonSetMemory returns the DaemonSetMemory field value if set, zero value otherwise.
|
|
func (o *O11yDaemonSetRecord) GetDaemonSetMemory() float64 {
|
|
if o == nil || IsNil(o.DaemonSetMemory) {
|
|
var ret float64
|
|
return ret
|
|
}
|
|
return *o.DaemonSetMemory
|
|
}
|
|
|
|
// GetDaemonSetMemoryOk returns a tuple with the DaemonSetMemory field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *O11yDaemonSetRecord) GetDaemonSetMemoryOk() (*float64, bool) {
|
|
if o == nil || IsNil(o.DaemonSetMemory) {
|
|
return nil, false
|
|
}
|
|
return o.DaemonSetMemory, true
|
|
}
|
|
|
|
// HasDaemonSetMemory returns a boolean if a field has been set.
|
|
func (o *O11yDaemonSetRecord) HasDaemonSetMemory() bool {
|
|
if o != nil && !IsNil(o.DaemonSetMemory) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetDaemonSetMemory gets a reference to the given float64 and assigns it to the DaemonSetMemory field.
|
|
func (o *O11yDaemonSetRecord) SetDaemonSetMemory(v float64) {
|
|
o.DaemonSetMemory = &v
|
|
}
|
|
|
|
// GetDaemonSetMemoryLimit returns the DaemonSetMemoryLimit field value if set, zero value otherwise.
|
|
func (o *O11yDaemonSetRecord) GetDaemonSetMemoryLimit() float64 {
|
|
if o == nil || IsNil(o.DaemonSetMemoryLimit) {
|
|
var ret float64
|
|
return ret
|
|
}
|
|
return *o.DaemonSetMemoryLimit
|
|
}
|
|
|
|
// GetDaemonSetMemoryLimitOk returns a tuple with the DaemonSetMemoryLimit field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *O11yDaemonSetRecord) GetDaemonSetMemoryLimitOk() (*float64, bool) {
|
|
if o == nil || IsNil(o.DaemonSetMemoryLimit) {
|
|
return nil, false
|
|
}
|
|
return o.DaemonSetMemoryLimit, true
|
|
}
|
|
|
|
// HasDaemonSetMemoryLimit returns a boolean if a field has been set.
|
|
func (o *O11yDaemonSetRecord) HasDaemonSetMemoryLimit() bool {
|
|
if o != nil && !IsNil(o.DaemonSetMemoryLimit) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetDaemonSetMemoryLimit gets a reference to the given float64 and assigns it to the DaemonSetMemoryLimit field.
|
|
func (o *O11yDaemonSetRecord) SetDaemonSetMemoryLimit(v float64) {
|
|
o.DaemonSetMemoryLimit = &v
|
|
}
|
|
|
|
// GetDaemonSetMemoryRequest returns the DaemonSetMemoryRequest field value if set, zero value otherwise.
|
|
func (o *O11yDaemonSetRecord) GetDaemonSetMemoryRequest() float64 {
|
|
if o == nil || IsNil(o.DaemonSetMemoryRequest) {
|
|
var ret float64
|
|
return ret
|
|
}
|
|
return *o.DaemonSetMemoryRequest
|
|
}
|
|
|
|
// GetDaemonSetMemoryRequestOk returns a tuple with the DaemonSetMemoryRequest field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *O11yDaemonSetRecord) GetDaemonSetMemoryRequestOk() (*float64, bool) {
|
|
if o == nil || IsNil(o.DaemonSetMemoryRequest) {
|
|
return nil, false
|
|
}
|
|
return o.DaemonSetMemoryRequest, true
|
|
}
|
|
|
|
// HasDaemonSetMemoryRequest returns a boolean if a field has been set.
|
|
func (o *O11yDaemonSetRecord) HasDaemonSetMemoryRequest() bool {
|
|
if o != nil && !IsNil(o.DaemonSetMemoryRequest) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetDaemonSetMemoryRequest gets a reference to the given float64 and assigns it to the DaemonSetMemoryRequest field.
|
|
func (o *O11yDaemonSetRecord) SetDaemonSetMemoryRequest(v float64) {
|
|
o.DaemonSetMemoryRequest = &v
|
|
}
|
|
|
|
// GetDaemonSetName returns the DaemonSetName field value if set, zero value otherwise.
|
|
func (o *O11yDaemonSetRecord) GetDaemonSetName() string {
|
|
if o == nil || IsNil(o.DaemonSetName) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.DaemonSetName
|
|
}
|
|
|
|
// GetDaemonSetNameOk returns a tuple with the DaemonSetName field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *O11yDaemonSetRecord) GetDaemonSetNameOk() (*string, bool) {
|
|
if o == nil || IsNil(o.DaemonSetName) {
|
|
return nil, false
|
|
}
|
|
return o.DaemonSetName, true
|
|
}
|
|
|
|
// HasDaemonSetName returns a boolean if a field has been set.
|
|
func (o *O11yDaemonSetRecord) HasDaemonSetName() bool {
|
|
if o != nil && !IsNil(o.DaemonSetName) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetDaemonSetName gets a reference to the given string and assigns it to the DaemonSetName field.
|
|
func (o *O11yDaemonSetRecord) SetDaemonSetName(v string) {
|
|
o.DaemonSetName = &v
|
|
}
|
|
|
|
// GetDesiredNodes returns the DesiredNodes field value if set, zero value otherwise.
|
|
func (o *O11yDaemonSetRecord) GetDesiredNodes() int64 {
|
|
if o == nil || IsNil(o.DesiredNodes) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.DesiredNodes
|
|
}
|
|
|
|
// GetDesiredNodesOk returns a tuple with the DesiredNodes field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *O11yDaemonSetRecord) GetDesiredNodesOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.DesiredNodes) {
|
|
return nil, false
|
|
}
|
|
return o.DesiredNodes, true
|
|
}
|
|
|
|
// HasDesiredNodes returns a boolean if a field has been set.
|
|
func (o *O11yDaemonSetRecord) HasDesiredNodes() bool {
|
|
if o != nil && !IsNil(o.DesiredNodes) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetDesiredNodes gets a reference to the given int64 and assigns it to the DesiredNodes field.
|
|
func (o *O11yDaemonSetRecord) SetDesiredNodes(v int64) {
|
|
o.DesiredNodes = &v
|
|
}
|
|
|
|
// GetMeta returns the Meta field value if set, zero value otherwise.
|
|
func (o *O11yDaemonSetRecord) GetMeta() map[string]string {
|
|
if o == nil || IsNil(o.Meta) {
|
|
var ret map[string]string
|
|
return ret
|
|
}
|
|
return o.Meta
|
|
}
|
|
|
|
// GetMetaOk returns a tuple with the Meta field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *O11yDaemonSetRecord) GetMetaOk() (map[string]string, bool) {
|
|
if o == nil || IsNil(o.Meta) {
|
|
return map[string]string{}, false
|
|
}
|
|
return o.Meta, true
|
|
}
|
|
|
|
// HasMeta returns a boolean if a field has been set.
|
|
func (o *O11yDaemonSetRecord) HasMeta() bool {
|
|
if o != nil && !IsNil(o.Meta) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetMeta gets a reference to the given map[string]string and assigns it to the Meta field.
|
|
func (o *O11yDaemonSetRecord) SetMeta(v map[string]string) {
|
|
o.Meta = v
|
|
}
|
|
|
|
// GetPodCountsByPhase returns the PodCountsByPhase field value if set, zero value otherwise.
|
|
func (o *O11yDaemonSetRecord) GetPodCountsByPhase() O11yPodCountsByPhase {
|
|
if o == nil || IsNil(o.PodCountsByPhase) {
|
|
var ret O11yPodCountsByPhase
|
|
return ret
|
|
}
|
|
return *o.PodCountsByPhase
|
|
}
|
|
|
|
// GetPodCountsByPhaseOk returns a tuple with the PodCountsByPhase field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *O11yDaemonSetRecord) GetPodCountsByPhaseOk() (*O11yPodCountsByPhase, bool) {
|
|
if o == nil || IsNil(o.PodCountsByPhase) {
|
|
return nil, false
|
|
}
|
|
return o.PodCountsByPhase, true
|
|
}
|
|
|
|
// HasPodCountsByPhase returns a boolean if a field has been set.
|
|
func (o *O11yDaemonSetRecord) HasPodCountsByPhase() bool {
|
|
if o != nil && !IsNil(o.PodCountsByPhase) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetPodCountsByPhase gets a reference to the given O11yPodCountsByPhase and assigns it to the PodCountsByPhase field.
|
|
func (o *O11yDaemonSetRecord) SetPodCountsByPhase(v O11yPodCountsByPhase) {
|
|
o.PodCountsByPhase = &v
|
|
}
|
|
|
|
func (o O11yDaemonSetRecord) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o O11yDaemonSetRecord) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.CurrentNodes) {
|
|
toSerialize["currentNodes"] = o.CurrentNodes
|
|
}
|
|
if !IsNil(o.DaemonSetCPU) {
|
|
toSerialize["daemonSetCPU"] = o.DaemonSetCPU
|
|
}
|
|
if !IsNil(o.DaemonSetCPULimit) {
|
|
toSerialize["daemonSetCPULimit"] = o.DaemonSetCPULimit
|
|
}
|
|
if !IsNil(o.DaemonSetCPURequest) {
|
|
toSerialize["daemonSetCPURequest"] = o.DaemonSetCPURequest
|
|
}
|
|
if !IsNil(o.DaemonSetMemory) {
|
|
toSerialize["daemonSetMemory"] = o.DaemonSetMemory
|
|
}
|
|
if !IsNil(o.DaemonSetMemoryLimit) {
|
|
toSerialize["daemonSetMemoryLimit"] = o.DaemonSetMemoryLimit
|
|
}
|
|
if !IsNil(o.DaemonSetMemoryRequest) {
|
|
toSerialize["daemonSetMemoryRequest"] = o.DaemonSetMemoryRequest
|
|
}
|
|
if !IsNil(o.DaemonSetName) {
|
|
toSerialize["daemonSetName"] = o.DaemonSetName
|
|
}
|
|
if !IsNil(o.DesiredNodes) {
|
|
toSerialize["desiredNodes"] = o.DesiredNodes
|
|
}
|
|
if !IsNil(o.Meta) {
|
|
toSerialize["meta"] = o.Meta
|
|
}
|
|
if !IsNil(o.PodCountsByPhase) {
|
|
toSerialize["podCountsByPhase"] = o.PodCountsByPhase
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *O11yDaemonSetRecord) UnmarshalJSON(data []byte) (err error) {
|
|
varO11yDaemonSetRecord := _O11yDaemonSetRecord{}
|
|
|
|
err = json.Unmarshal(data, &varO11yDaemonSetRecord)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = O11yDaemonSetRecord(varO11yDaemonSetRecord)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "currentNodes")
|
|
delete(additionalProperties, "daemonSetCPU")
|
|
delete(additionalProperties, "daemonSetCPULimit")
|
|
delete(additionalProperties, "daemonSetCPURequest")
|
|
delete(additionalProperties, "daemonSetMemory")
|
|
delete(additionalProperties, "daemonSetMemoryLimit")
|
|
delete(additionalProperties, "daemonSetMemoryRequest")
|
|
delete(additionalProperties, "daemonSetName")
|
|
delete(additionalProperties, "desiredNodes")
|
|
delete(additionalProperties, "meta")
|
|
delete(additionalProperties, "podCountsByPhase")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableO11yDaemonSetRecord struct {
|
|
value *O11yDaemonSetRecord
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableO11yDaemonSetRecord) Get() *O11yDaemonSetRecord {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableO11yDaemonSetRecord) Set(val *O11yDaemonSetRecord) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableO11yDaemonSetRecord) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableO11yDaemonSetRecord) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableO11yDaemonSetRecord(val *O11yDaemonSetRecord) *NullableO11yDaemonSetRecord {
|
|
return &NullableO11yDaemonSetRecord{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableO11yDaemonSetRecord) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableO11yDaemonSetRecord) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|