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 O11yDeploymentRecord type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &O11yDeploymentRecord{}
|
|
|
|
// O11yDeploymentRecord struct for O11yDeploymentRecord
|
|
type O11yDeploymentRecord struct {
|
|
AvailablePods *int64 `json:"availablePods,omitempty"`
|
|
DeploymentCPU *float64 `json:"deploymentCPU,omitempty"`
|
|
DeploymentCPULimit *float64 `json:"deploymentCPULimit,omitempty"`
|
|
DeploymentCPURequest *float64 `json:"deploymentCPURequest,omitempty"`
|
|
DeploymentMemory *float64 `json:"deploymentMemory,omitempty"`
|
|
DeploymentMemoryLimit *float64 `json:"deploymentMemoryLimit,omitempty"`
|
|
DeploymentMemoryRequest *float64 `json:"deploymentMemoryRequest,omitempty"`
|
|
DeploymentName *string `json:"deploymentName,omitempty"`
|
|
DesiredPods *int64 `json:"desiredPods,omitempty"`
|
|
Meta map[string]string `json:"meta,omitempty"`
|
|
PodCountsByPhase *O11yPodCountsByPhase `json:"podCountsByPhase,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _O11yDeploymentRecord O11yDeploymentRecord
|
|
|
|
// NewO11yDeploymentRecord instantiates a new O11yDeploymentRecord 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 NewO11yDeploymentRecord() *O11yDeploymentRecord {
|
|
this := O11yDeploymentRecord{}
|
|
return &this
|
|
}
|
|
|
|
// NewO11yDeploymentRecordWithDefaults instantiates a new O11yDeploymentRecord 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 NewO11yDeploymentRecordWithDefaults() *O11yDeploymentRecord {
|
|
this := O11yDeploymentRecord{}
|
|
return &this
|
|
}
|
|
|
|
// GetAvailablePods returns the AvailablePods field value if set, zero value otherwise.
|
|
func (o *O11yDeploymentRecord) GetAvailablePods() int64 {
|
|
if o == nil || IsNil(o.AvailablePods) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.AvailablePods
|
|
}
|
|
|
|
// GetAvailablePodsOk returns a tuple with the AvailablePods field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *O11yDeploymentRecord) GetAvailablePodsOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.AvailablePods) {
|
|
return nil, false
|
|
}
|
|
return o.AvailablePods, true
|
|
}
|
|
|
|
// HasAvailablePods returns a boolean if a field has been set.
|
|
func (o *O11yDeploymentRecord) HasAvailablePods() bool {
|
|
if o != nil && !IsNil(o.AvailablePods) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetAvailablePods gets a reference to the given int64 and assigns it to the AvailablePods field.
|
|
func (o *O11yDeploymentRecord) SetAvailablePods(v int64) {
|
|
o.AvailablePods = &v
|
|
}
|
|
|
|
// GetDeploymentCPU returns the DeploymentCPU field value if set, zero value otherwise.
|
|
func (o *O11yDeploymentRecord) GetDeploymentCPU() float64 {
|
|
if o == nil || IsNil(o.DeploymentCPU) {
|
|
var ret float64
|
|
return ret
|
|
}
|
|
return *o.DeploymentCPU
|
|
}
|
|
|
|
// GetDeploymentCPUOk returns a tuple with the DeploymentCPU field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *O11yDeploymentRecord) GetDeploymentCPUOk() (*float64, bool) {
|
|
if o == nil || IsNil(o.DeploymentCPU) {
|
|
return nil, false
|
|
}
|
|
return o.DeploymentCPU, true
|
|
}
|
|
|
|
// HasDeploymentCPU returns a boolean if a field has been set.
|
|
func (o *O11yDeploymentRecord) HasDeploymentCPU() bool {
|
|
if o != nil && !IsNil(o.DeploymentCPU) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetDeploymentCPU gets a reference to the given float64 and assigns it to the DeploymentCPU field.
|
|
func (o *O11yDeploymentRecord) SetDeploymentCPU(v float64) {
|
|
o.DeploymentCPU = &v
|
|
}
|
|
|
|
// GetDeploymentCPULimit returns the DeploymentCPULimit field value if set, zero value otherwise.
|
|
func (o *O11yDeploymentRecord) GetDeploymentCPULimit() float64 {
|
|
if o == nil || IsNil(o.DeploymentCPULimit) {
|
|
var ret float64
|
|
return ret
|
|
}
|
|
return *o.DeploymentCPULimit
|
|
}
|
|
|
|
// GetDeploymentCPULimitOk returns a tuple with the DeploymentCPULimit field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *O11yDeploymentRecord) GetDeploymentCPULimitOk() (*float64, bool) {
|
|
if o == nil || IsNil(o.DeploymentCPULimit) {
|
|
return nil, false
|
|
}
|
|
return o.DeploymentCPULimit, true
|
|
}
|
|
|
|
// HasDeploymentCPULimit returns a boolean if a field has been set.
|
|
func (o *O11yDeploymentRecord) HasDeploymentCPULimit() bool {
|
|
if o != nil && !IsNil(o.DeploymentCPULimit) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetDeploymentCPULimit gets a reference to the given float64 and assigns it to the DeploymentCPULimit field.
|
|
func (o *O11yDeploymentRecord) SetDeploymentCPULimit(v float64) {
|
|
o.DeploymentCPULimit = &v
|
|
}
|
|
|
|
// GetDeploymentCPURequest returns the DeploymentCPURequest field value if set, zero value otherwise.
|
|
func (o *O11yDeploymentRecord) GetDeploymentCPURequest() float64 {
|
|
if o == nil || IsNil(o.DeploymentCPURequest) {
|
|
var ret float64
|
|
return ret
|
|
}
|
|
return *o.DeploymentCPURequest
|
|
}
|
|
|
|
// GetDeploymentCPURequestOk returns a tuple with the DeploymentCPURequest field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *O11yDeploymentRecord) GetDeploymentCPURequestOk() (*float64, bool) {
|
|
if o == nil || IsNil(o.DeploymentCPURequest) {
|
|
return nil, false
|
|
}
|
|
return o.DeploymentCPURequest, true
|
|
}
|
|
|
|
// HasDeploymentCPURequest returns a boolean if a field has been set.
|
|
func (o *O11yDeploymentRecord) HasDeploymentCPURequest() bool {
|
|
if o != nil && !IsNil(o.DeploymentCPURequest) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetDeploymentCPURequest gets a reference to the given float64 and assigns it to the DeploymentCPURequest field.
|
|
func (o *O11yDeploymentRecord) SetDeploymentCPURequest(v float64) {
|
|
o.DeploymentCPURequest = &v
|
|
}
|
|
|
|
// GetDeploymentMemory returns the DeploymentMemory field value if set, zero value otherwise.
|
|
func (o *O11yDeploymentRecord) GetDeploymentMemory() float64 {
|
|
if o == nil || IsNil(o.DeploymentMemory) {
|
|
var ret float64
|
|
return ret
|
|
}
|
|
return *o.DeploymentMemory
|
|
}
|
|
|
|
// GetDeploymentMemoryOk returns a tuple with the DeploymentMemory field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *O11yDeploymentRecord) GetDeploymentMemoryOk() (*float64, bool) {
|
|
if o == nil || IsNil(o.DeploymentMemory) {
|
|
return nil, false
|
|
}
|
|
return o.DeploymentMemory, true
|
|
}
|
|
|
|
// HasDeploymentMemory returns a boolean if a field has been set.
|
|
func (o *O11yDeploymentRecord) HasDeploymentMemory() bool {
|
|
if o != nil && !IsNil(o.DeploymentMemory) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetDeploymentMemory gets a reference to the given float64 and assigns it to the DeploymentMemory field.
|
|
func (o *O11yDeploymentRecord) SetDeploymentMemory(v float64) {
|
|
o.DeploymentMemory = &v
|
|
}
|
|
|
|
// GetDeploymentMemoryLimit returns the DeploymentMemoryLimit field value if set, zero value otherwise.
|
|
func (o *O11yDeploymentRecord) GetDeploymentMemoryLimit() float64 {
|
|
if o == nil || IsNil(o.DeploymentMemoryLimit) {
|
|
var ret float64
|
|
return ret
|
|
}
|
|
return *o.DeploymentMemoryLimit
|
|
}
|
|
|
|
// GetDeploymentMemoryLimitOk returns a tuple with the DeploymentMemoryLimit field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *O11yDeploymentRecord) GetDeploymentMemoryLimitOk() (*float64, bool) {
|
|
if o == nil || IsNil(o.DeploymentMemoryLimit) {
|
|
return nil, false
|
|
}
|
|
return o.DeploymentMemoryLimit, true
|
|
}
|
|
|
|
// HasDeploymentMemoryLimit returns a boolean if a field has been set.
|
|
func (o *O11yDeploymentRecord) HasDeploymentMemoryLimit() bool {
|
|
if o != nil && !IsNil(o.DeploymentMemoryLimit) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetDeploymentMemoryLimit gets a reference to the given float64 and assigns it to the DeploymentMemoryLimit field.
|
|
func (o *O11yDeploymentRecord) SetDeploymentMemoryLimit(v float64) {
|
|
o.DeploymentMemoryLimit = &v
|
|
}
|
|
|
|
// GetDeploymentMemoryRequest returns the DeploymentMemoryRequest field value if set, zero value otherwise.
|
|
func (o *O11yDeploymentRecord) GetDeploymentMemoryRequest() float64 {
|
|
if o == nil || IsNil(o.DeploymentMemoryRequest) {
|
|
var ret float64
|
|
return ret
|
|
}
|
|
return *o.DeploymentMemoryRequest
|
|
}
|
|
|
|
// GetDeploymentMemoryRequestOk returns a tuple with the DeploymentMemoryRequest field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *O11yDeploymentRecord) GetDeploymentMemoryRequestOk() (*float64, bool) {
|
|
if o == nil || IsNil(o.DeploymentMemoryRequest) {
|
|
return nil, false
|
|
}
|
|
return o.DeploymentMemoryRequest, true
|
|
}
|
|
|
|
// HasDeploymentMemoryRequest returns a boolean if a field has been set.
|
|
func (o *O11yDeploymentRecord) HasDeploymentMemoryRequest() bool {
|
|
if o != nil && !IsNil(o.DeploymentMemoryRequest) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetDeploymentMemoryRequest gets a reference to the given float64 and assigns it to the DeploymentMemoryRequest field.
|
|
func (o *O11yDeploymentRecord) SetDeploymentMemoryRequest(v float64) {
|
|
o.DeploymentMemoryRequest = &v
|
|
}
|
|
|
|
// GetDeploymentName returns the DeploymentName field value if set, zero value otherwise.
|
|
func (o *O11yDeploymentRecord) GetDeploymentName() string {
|
|
if o == nil || IsNil(o.DeploymentName) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.DeploymentName
|
|
}
|
|
|
|
// GetDeploymentNameOk returns a tuple with the DeploymentName field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *O11yDeploymentRecord) GetDeploymentNameOk() (*string, bool) {
|
|
if o == nil || IsNil(o.DeploymentName) {
|
|
return nil, false
|
|
}
|
|
return o.DeploymentName, true
|
|
}
|
|
|
|
// HasDeploymentName returns a boolean if a field has been set.
|
|
func (o *O11yDeploymentRecord) HasDeploymentName() bool {
|
|
if o != nil && !IsNil(o.DeploymentName) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetDeploymentName gets a reference to the given string and assigns it to the DeploymentName field.
|
|
func (o *O11yDeploymentRecord) SetDeploymentName(v string) {
|
|
o.DeploymentName = &v
|
|
}
|
|
|
|
// GetDesiredPods returns the DesiredPods field value if set, zero value otherwise.
|
|
func (o *O11yDeploymentRecord) GetDesiredPods() int64 {
|
|
if o == nil || IsNil(o.DesiredPods) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.DesiredPods
|
|
}
|
|
|
|
// GetDesiredPodsOk returns a tuple with the DesiredPods field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *O11yDeploymentRecord) GetDesiredPodsOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.DesiredPods) {
|
|
return nil, false
|
|
}
|
|
return o.DesiredPods, true
|
|
}
|
|
|
|
// HasDesiredPods returns a boolean if a field has been set.
|
|
func (o *O11yDeploymentRecord) HasDesiredPods() bool {
|
|
if o != nil && !IsNil(o.DesiredPods) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetDesiredPods gets a reference to the given int64 and assigns it to the DesiredPods field.
|
|
func (o *O11yDeploymentRecord) SetDesiredPods(v int64) {
|
|
o.DesiredPods = &v
|
|
}
|
|
|
|
// GetMeta returns the Meta field value if set, zero value otherwise.
|
|
func (o *O11yDeploymentRecord) 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 *O11yDeploymentRecord) 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 *O11yDeploymentRecord) 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 *O11yDeploymentRecord) SetMeta(v map[string]string) {
|
|
o.Meta = v
|
|
}
|
|
|
|
// GetPodCountsByPhase returns the PodCountsByPhase field value if set, zero value otherwise.
|
|
func (o *O11yDeploymentRecord) 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 *O11yDeploymentRecord) 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 *O11yDeploymentRecord) 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 *O11yDeploymentRecord) SetPodCountsByPhase(v O11yPodCountsByPhase) {
|
|
o.PodCountsByPhase = &v
|
|
}
|
|
|
|
func (o O11yDeploymentRecord) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o O11yDeploymentRecord) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.AvailablePods) {
|
|
toSerialize["availablePods"] = o.AvailablePods
|
|
}
|
|
if !IsNil(o.DeploymentCPU) {
|
|
toSerialize["deploymentCPU"] = o.DeploymentCPU
|
|
}
|
|
if !IsNil(o.DeploymentCPULimit) {
|
|
toSerialize["deploymentCPULimit"] = o.DeploymentCPULimit
|
|
}
|
|
if !IsNil(o.DeploymentCPURequest) {
|
|
toSerialize["deploymentCPURequest"] = o.DeploymentCPURequest
|
|
}
|
|
if !IsNil(o.DeploymentMemory) {
|
|
toSerialize["deploymentMemory"] = o.DeploymentMemory
|
|
}
|
|
if !IsNil(o.DeploymentMemoryLimit) {
|
|
toSerialize["deploymentMemoryLimit"] = o.DeploymentMemoryLimit
|
|
}
|
|
if !IsNil(o.DeploymentMemoryRequest) {
|
|
toSerialize["deploymentMemoryRequest"] = o.DeploymentMemoryRequest
|
|
}
|
|
if !IsNil(o.DeploymentName) {
|
|
toSerialize["deploymentName"] = o.DeploymentName
|
|
}
|
|
if !IsNil(o.DesiredPods) {
|
|
toSerialize["desiredPods"] = o.DesiredPods
|
|
}
|
|
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 *O11yDeploymentRecord) UnmarshalJSON(data []byte) (err error) {
|
|
varO11yDeploymentRecord := _O11yDeploymentRecord{}
|
|
|
|
err = json.Unmarshal(data, &varO11yDeploymentRecord)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = O11yDeploymentRecord(varO11yDeploymentRecord)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "availablePods")
|
|
delete(additionalProperties, "deploymentCPU")
|
|
delete(additionalProperties, "deploymentCPULimit")
|
|
delete(additionalProperties, "deploymentCPURequest")
|
|
delete(additionalProperties, "deploymentMemory")
|
|
delete(additionalProperties, "deploymentMemoryLimit")
|
|
delete(additionalProperties, "deploymentMemoryRequest")
|
|
delete(additionalProperties, "deploymentName")
|
|
delete(additionalProperties, "desiredPods")
|
|
delete(additionalProperties, "meta")
|
|
delete(additionalProperties, "podCountsByPhase")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableO11yDeploymentRecord struct {
|
|
value *O11yDeploymentRecord
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableO11yDeploymentRecord) Get() *O11yDeploymentRecord {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableO11yDeploymentRecord) Set(val *O11yDeploymentRecord) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableO11yDeploymentRecord) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableO11yDeploymentRecord) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableO11yDeploymentRecord(val *O11yDeploymentRecord) *NullableO11yDeploymentRecord {
|
|
return &NullableO11yDeploymentRecord{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableO11yDeploymentRecord) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableO11yDeploymentRecord) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|