mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
191 lines
4.7 KiB
Go
191 lines
4.7 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 O11yLimitValue type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &O11yLimitValue{}
|
|
|
|
// O11yLimitValue struct for O11yLimitValue
|
|
type O11yLimitValue struct {
|
|
Count *int64 `json:"count,omitempty"`
|
|
Size *int64 `json:"size,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _O11yLimitValue O11yLimitValue
|
|
|
|
// NewO11yLimitValue instantiates a new O11yLimitValue 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 NewO11yLimitValue() *O11yLimitValue {
|
|
this := O11yLimitValue{}
|
|
return &this
|
|
}
|
|
|
|
// NewO11yLimitValueWithDefaults instantiates a new O11yLimitValue 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 NewO11yLimitValueWithDefaults() *O11yLimitValue {
|
|
this := O11yLimitValue{}
|
|
return &this
|
|
}
|
|
|
|
// GetCount returns the Count field value if set, zero value otherwise.
|
|
func (o *O11yLimitValue) GetCount() int64 {
|
|
if o == nil || IsNil(o.Count) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.Count
|
|
}
|
|
|
|
// GetCountOk returns a tuple with the Count field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *O11yLimitValue) GetCountOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.Count) {
|
|
return nil, false
|
|
}
|
|
return o.Count, true
|
|
}
|
|
|
|
// HasCount returns a boolean if a field has been set.
|
|
func (o *O11yLimitValue) HasCount() bool {
|
|
if o != nil && !IsNil(o.Count) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetCount gets a reference to the given int64 and assigns it to the Count field.
|
|
func (o *O11yLimitValue) SetCount(v int64) {
|
|
o.Count = &v
|
|
}
|
|
|
|
// GetSize returns the Size field value if set, zero value otherwise.
|
|
func (o *O11yLimitValue) GetSize() int64 {
|
|
if o == nil || IsNil(o.Size) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.Size
|
|
}
|
|
|
|
// GetSizeOk returns a tuple with the Size field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *O11yLimitValue) GetSizeOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.Size) {
|
|
return nil, false
|
|
}
|
|
return o.Size, true
|
|
}
|
|
|
|
// HasSize returns a boolean if a field has been set.
|
|
func (o *O11yLimitValue) HasSize() bool {
|
|
if o != nil && !IsNil(o.Size) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetSize gets a reference to the given int64 and assigns it to the Size field.
|
|
func (o *O11yLimitValue) SetSize(v int64) {
|
|
o.Size = &v
|
|
}
|
|
|
|
func (o O11yLimitValue) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o O11yLimitValue) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Count) {
|
|
toSerialize["count"] = o.Count
|
|
}
|
|
if !IsNil(o.Size) {
|
|
toSerialize["size"] = o.Size
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *O11yLimitValue) UnmarshalJSON(data []byte) (err error) {
|
|
varO11yLimitValue := _O11yLimitValue{}
|
|
|
|
err = json.Unmarshal(data, &varO11yLimitValue)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = O11yLimitValue(varO11yLimitValue)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "count")
|
|
delete(additionalProperties, "size")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableO11yLimitValue struct {
|
|
value *O11yLimitValue
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableO11yLimitValue) Get() *O11yLimitValue {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableO11yLimitValue) Set(val *O11yLimitValue) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableO11yLimitValue) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableO11yLimitValue) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableO11yLimitValue(val *O11yLimitValue) *NullableO11yLimitValue {
|
|
return &NullableO11yLimitValue{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableO11yLimitValue) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableO11yLimitValue) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|