mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
228 lines
6.2 KiB
Go
228 lines
6.2 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 O11yNodeCountByCondition type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &O11yNodeCountByCondition{}
|
|
|
|
// O11yNodeCountByCondition struct for O11yNodeCountByCondition
|
|
type O11yNodeCountByCondition struct {
|
|
NotReady *int64 `json:"notReady,omitempty"`
|
|
Ready *int64 `json:"ready,omitempty"`
|
|
Unknown *int64 `json:"unknown,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _O11yNodeCountByCondition O11yNodeCountByCondition
|
|
|
|
// NewO11yNodeCountByCondition instantiates a new O11yNodeCountByCondition 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 NewO11yNodeCountByCondition() *O11yNodeCountByCondition {
|
|
this := O11yNodeCountByCondition{}
|
|
return &this
|
|
}
|
|
|
|
// NewO11yNodeCountByConditionWithDefaults instantiates a new O11yNodeCountByCondition 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 NewO11yNodeCountByConditionWithDefaults() *O11yNodeCountByCondition {
|
|
this := O11yNodeCountByCondition{}
|
|
return &this
|
|
}
|
|
|
|
// GetNotReady returns the NotReady field value if set, zero value otherwise.
|
|
func (o *O11yNodeCountByCondition) GetNotReady() int64 {
|
|
if o == nil || IsNil(o.NotReady) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.NotReady
|
|
}
|
|
|
|
// GetNotReadyOk returns a tuple with the NotReady field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *O11yNodeCountByCondition) GetNotReadyOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.NotReady) {
|
|
return nil, false
|
|
}
|
|
return o.NotReady, true
|
|
}
|
|
|
|
// HasNotReady returns a boolean if a field has been set.
|
|
func (o *O11yNodeCountByCondition) HasNotReady() bool {
|
|
if o != nil && !IsNil(o.NotReady) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetNotReady gets a reference to the given int64 and assigns it to the NotReady field.
|
|
func (o *O11yNodeCountByCondition) SetNotReady(v int64) {
|
|
o.NotReady = &v
|
|
}
|
|
|
|
// GetReady returns the Ready field value if set, zero value otherwise.
|
|
func (o *O11yNodeCountByCondition) GetReady() int64 {
|
|
if o == nil || IsNil(o.Ready) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.Ready
|
|
}
|
|
|
|
// GetReadyOk returns a tuple with the Ready field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *O11yNodeCountByCondition) GetReadyOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.Ready) {
|
|
return nil, false
|
|
}
|
|
return o.Ready, true
|
|
}
|
|
|
|
// HasReady returns a boolean if a field has been set.
|
|
func (o *O11yNodeCountByCondition) HasReady() bool {
|
|
if o != nil && !IsNil(o.Ready) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetReady gets a reference to the given int64 and assigns it to the Ready field.
|
|
func (o *O11yNodeCountByCondition) SetReady(v int64) {
|
|
o.Ready = &v
|
|
}
|
|
|
|
// GetUnknown returns the Unknown field value if set, zero value otherwise.
|
|
func (o *O11yNodeCountByCondition) GetUnknown() int64 {
|
|
if o == nil || IsNil(o.Unknown) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.Unknown
|
|
}
|
|
|
|
// GetUnknownOk returns a tuple with the Unknown field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *O11yNodeCountByCondition) GetUnknownOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.Unknown) {
|
|
return nil, false
|
|
}
|
|
return o.Unknown, true
|
|
}
|
|
|
|
// HasUnknown returns a boolean if a field has been set.
|
|
func (o *O11yNodeCountByCondition) HasUnknown() bool {
|
|
if o != nil && !IsNil(o.Unknown) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetUnknown gets a reference to the given int64 and assigns it to the Unknown field.
|
|
func (o *O11yNodeCountByCondition) SetUnknown(v int64) {
|
|
o.Unknown = &v
|
|
}
|
|
|
|
func (o O11yNodeCountByCondition) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o O11yNodeCountByCondition) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.NotReady) {
|
|
toSerialize["notReady"] = o.NotReady
|
|
}
|
|
if !IsNil(o.Ready) {
|
|
toSerialize["ready"] = o.Ready
|
|
}
|
|
if !IsNil(o.Unknown) {
|
|
toSerialize["unknown"] = o.Unknown
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *O11yNodeCountByCondition) UnmarshalJSON(data []byte) (err error) {
|
|
varO11yNodeCountByCondition := _O11yNodeCountByCondition{}
|
|
|
|
err = json.Unmarshal(data, &varO11yNodeCountByCondition)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = O11yNodeCountByCondition(varO11yNodeCountByCondition)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "notReady")
|
|
delete(additionalProperties, "ready")
|
|
delete(additionalProperties, "unknown")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableO11yNodeCountByCondition struct {
|
|
value *O11yNodeCountByCondition
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableO11yNodeCountByCondition) Get() *O11yNodeCountByCondition {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableO11yNodeCountByCondition) Set(val *O11yNodeCountByCondition) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableO11yNodeCountByCondition) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableO11yNodeCountByCondition) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableO11yNodeCountByCondition(val *O11yNodeCountByCondition) *NullableO11yNodeCountByCondition {
|
|
return &NullableO11yNodeCountByCondition{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableO11yNodeCountByCondition) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableO11yNodeCountByCondition) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|