mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
413 lines
13 KiB
Go
413 lines
13 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 O11yStats type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &O11yStats{}
|
|
|
|
// O11yStats struct for O11yStats
|
|
type O11yStats struct {
|
|
CurrentAvgResolutionTime *string `json:"currentAvgResolutionTime,omitempty"`
|
|
CurrentAvgResolutionTimeSeries *O11ySeries `json:"currentAvgResolutionTimeSeries,omitempty"`
|
|
CurrentTriggersSeries *O11ySeries `json:"currentTriggersSeries,omitempty"`
|
|
PastAvgResolutionTime *string `json:"pastAvgResolutionTime,omitempty"`
|
|
PastAvgResolutionTimeSeries *O11ySeries `json:"pastAvgResolutionTimeSeries,omitempty"`
|
|
PastTriggersSeries *O11ySeries `json:"pastTriggersSeries,omitempty"`
|
|
TotalCurrentTriggers *int32 `json:"totalCurrentTriggers,omitempty"`
|
|
TotalPastTriggers *int32 `json:"totalPastTriggers,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _O11yStats O11yStats
|
|
|
|
// NewO11yStats instantiates a new O11yStats 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 NewO11yStats() *O11yStats {
|
|
this := O11yStats{}
|
|
return &this
|
|
}
|
|
|
|
// NewO11yStatsWithDefaults instantiates a new O11yStats 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 NewO11yStatsWithDefaults() *O11yStats {
|
|
this := O11yStats{}
|
|
return &this
|
|
}
|
|
|
|
// GetCurrentAvgResolutionTime returns the CurrentAvgResolutionTime field value if set, zero value otherwise.
|
|
func (o *O11yStats) GetCurrentAvgResolutionTime() string {
|
|
if o == nil || IsNil(o.CurrentAvgResolutionTime) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.CurrentAvgResolutionTime
|
|
}
|
|
|
|
// GetCurrentAvgResolutionTimeOk returns a tuple with the CurrentAvgResolutionTime field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *O11yStats) GetCurrentAvgResolutionTimeOk() (*string, bool) {
|
|
if o == nil || IsNil(o.CurrentAvgResolutionTime) {
|
|
return nil, false
|
|
}
|
|
return o.CurrentAvgResolutionTime, true
|
|
}
|
|
|
|
// HasCurrentAvgResolutionTime returns a boolean if a field has been set.
|
|
func (o *O11yStats) HasCurrentAvgResolutionTime() bool {
|
|
if o != nil && !IsNil(o.CurrentAvgResolutionTime) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetCurrentAvgResolutionTime gets a reference to the given string and assigns it to the CurrentAvgResolutionTime field.
|
|
func (o *O11yStats) SetCurrentAvgResolutionTime(v string) {
|
|
o.CurrentAvgResolutionTime = &v
|
|
}
|
|
|
|
// GetCurrentAvgResolutionTimeSeries returns the CurrentAvgResolutionTimeSeries field value if set, zero value otherwise.
|
|
func (o *O11yStats) GetCurrentAvgResolutionTimeSeries() O11ySeries {
|
|
if o == nil || IsNil(o.CurrentAvgResolutionTimeSeries) {
|
|
var ret O11ySeries
|
|
return ret
|
|
}
|
|
return *o.CurrentAvgResolutionTimeSeries
|
|
}
|
|
|
|
// GetCurrentAvgResolutionTimeSeriesOk returns a tuple with the CurrentAvgResolutionTimeSeries field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *O11yStats) GetCurrentAvgResolutionTimeSeriesOk() (*O11ySeries, bool) {
|
|
if o == nil || IsNil(o.CurrentAvgResolutionTimeSeries) {
|
|
return nil, false
|
|
}
|
|
return o.CurrentAvgResolutionTimeSeries, true
|
|
}
|
|
|
|
// HasCurrentAvgResolutionTimeSeries returns a boolean if a field has been set.
|
|
func (o *O11yStats) HasCurrentAvgResolutionTimeSeries() bool {
|
|
if o != nil && !IsNil(o.CurrentAvgResolutionTimeSeries) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetCurrentAvgResolutionTimeSeries gets a reference to the given O11ySeries and assigns it to the CurrentAvgResolutionTimeSeries field.
|
|
func (o *O11yStats) SetCurrentAvgResolutionTimeSeries(v O11ySeries) {
|
|
o.CurrentAvgResolutionTimeSeries = &v
|
|
}
|
|
|
|
// GetCurrentTriggersSeries returns the CurrentTriggersSeries field value if set, zero value otherwise.
|
|
func (o *O11yStats) GetCurrentTriggersSeries() O11ySeries {
|
|
if o == nil || IsNil(o.CurrentTriggersSeries) {
|
|
var ret O11ySeries
|
|
return ret
|
|
}
|
|
return *o.CurrentTriggersSeries
|
|
}
|
|
|
|
// GetCurrentTriggersSeriesOk returns a tuple with the CurrentTriggersSeries field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *O11yStats) GetCurrentTriggersSeriesOk() (*O11ySeries, bool) {
|
|
if o == nil || IsNil(o.CurrentTriggersSeries) {
|
|
return nil, false
|
|
}
|
|
return o.CurrentTriggersSeries, true
|
|
}
|
|
|
|
// HasCurrentTriggersSeries returns a boolean if a field has been set.
|
|
func (o *O11yStats) HasCurrentTriggersSeries() bool {
|
|
if o != nil && !IsNil(o.CurrentTriggersSeries) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetCurrentTriggersSeries gets a reference to the given O11ySeries and assigns it to the CurrentTriggersSeries field.
|
|
func (o *O11yStats) SetCurrentTriggersSeries(v O11ySeries) {
|
|
o.CurrentTriggersSeries = &v
|
|
}
|
|
|
|
// GetPastAvgResolutionTime returns the PastAvgResolutionTime field value if set, zero value otherwise.
|
|
func (o *O11yStats) GetPastAvgResolutionTime() string {
|
|
if o == nil || IsNil(o.PastAvgResolutionTime) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.PastAvgResolutionTime
|
|
}
|
|
|
|
// GetPastAvgResolutionTimeOk returns a tuple with the PastAvgResolutionTime field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *O11yStats) GetPastAvgResolutionTimeOk() (*string, bool) {
|
|
if o == nil || IsNil(o.PastAvgResolutionTime) {
|
|
return nil, false
|
|
}
|
|
return o.PastAvgResolutionTime, true
|
|
}
|
|
|
|
// HasPastAvgResolutionTime returns a boolean if a field has been set.
|
|
func (o *O11yStats) HasPastAvgResolutionTime() bool {
|
|
if o != nil && !IsNil(o.PastAvgResolutionTime) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetPastAvgResolutionTime gets a reference to the given string and assigns it to the PastAvgResolutionTime field.
|
|
func (o *O11yStats) SetPastAvgResolutionTime(v string) {
|
|
o.PastAvgResolutionTime = &v
|
|
}
|
|
|
|
// GetPastAvgResolutionTimeSeries returns the PastAvgResolutionTimeSeries field value if set, zero value otherwise.
|
|
func (o *O11yStats) GetPastAvgResolutionTimeSeries() O11ySeries {
|
|
if o == nil || IsNil(o.PastAvgResolutionTimeSeries) {
|
|
var ret O11ySeries
|
|
return ret
|
|
}
|
|
return *o.PastAvgResolutionTimeSeries
|
|
}
|
|
|
|
// GetPastAvgResolutionTimeSeriesOk returns a tuple with the PastAvgResolutionTimeSeries field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *O11yStats) GetPastAvgResolutionTimeSeriesOk() (*O11ySeries, bool) {
|
|
if o == nil || IsNil(o.PastAvgResolutionTimeSeries) {
|
|
return nil, false
|
|
}
|
|
return o.PastAvgResolutionTimeSeries, true
|
|
}
|
|
|
|
// HasPastAvgResolutionTimeSeries returns a boolean if a field has been set.
|
|
func (o *O11yStats) HasPastAvgResolutionTimeSeries() bool {
|
|
if o != nil && !IsNil(o.PastAvgResolutionTimeSeries) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetPastAvgResolutionTimeSeries gets a reference to the given O11ySeries and assigns it to the PastAvgResolutionTimeSeries field.
|
|
func (o *O11yStats) SetPastAvgResolutionTimeSeries(v O11ySeries) {
|
|
o.PastAvgResolutionTimeSeries = &v
|
|
}
|
|
|
|
// GetPastTriggersSeries returns the PastTriggersSeries field value if set, zero value otherwise.
|
|
func (o *O11yStats) GetPastTriggersSeries() O11ySeries {
|
|
if o == nil || IsNil(o.PastTriggersSeries) {
|
|
var ret O11ySeries
|
|
return ret
|
|
}
|
|
return *o.PastTriggersSeries
|
|
}
|
|
|
|
// GetPastTriggersSeriesOk returns a tuple with the PastTriggersSeries field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *O11yStats) GetPastTriggersSeriesOk() (*O11ySeries, bool) {
|
|
if o == nil || IsNil(o.PastTriggersSeries) {
|
|
return nil, false
|
|
}
|
|
return o.PastTriggersSeries, true
|
|
}
|
|
|
|
// HasPastTriggersSeries returns a boolean if a field has been set.
|
|
func (o *O11yStats) HasPastTriggersSeries() bool {
|
|
if o != nil && !IsNil(o.PastTriggersSeries) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetPastTriggersSeries gets a reference to the given O11ySeries and assigns it to the PastTriggersSeries field.
|
|
func (o *O11yStats) SetPastTriggersSeries(v O11ySeries) {
|
|
o.PastTriggersSeries = &v
|
|
}
|
|
|
|
// GetTotalCurrentTriggers returns the TotalCurrentTriggers field value if set, zero value otherwise.
|
|
func (o *O11yStats) GetTotalCurrentTriggers() int32 {
|
|
if o == nil || IsNil(o.TotalCurrentTriggers) {
|
|
var ret int32
|
|
return ret
|
|
}
|
|
return *o.TotalCurrentTriggers
|
|
}
|
|
|
|
// GetTotalCurrentTriggersOk returns a tuple with the TotalCurrentTriggers field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *O11yStats) GetTotalCurrentTriggersOk() (*int32, bool) {
|
|
if o == nil || IsNil(o.TotalCurrentTriggers) {
|
|
return nil, false
|
|
}
|
|
return o.TotalCurrentTriggers, true
|
|
}
|
|
|
|
// HasTotalCurrentTriggers returns a boolean if a field has been set.
|
|
func (o *O11yStats) HasTotalCurrentTriggers() bool {
|
|
if o != nil && !IsNil(o.TotalCurrentTriggers) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetTotalCurrentTriggers gets a reference to the given int32 and assigns it to the TotalCurrentTriggers field.
|
|
func (o *O11yStats) SetTotalCurrentTriggers(v int32) {
|
|
o.TotalCurrentTriggers = &v
|
|
}
|
|
|
|
// GetTotalPastTriggers returns the TotalPastTriggers field value if set, zero value otherwise.
|
|
func (o *O11yStats) GetTotalPastTriggers() int32 {
|
|
if o == nil || IsNil(o.TotalPastTriggers) {
|
|
var ret int32
|
|
return ret
|
|
}
|
|
return *o.TotalPastTriggers
|
|
}
|
|
|
|
// GetTotalPastTriggersOk returns a tuple with the TotalPastTriggers field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *O11yStats) GetTotalPastTriggersOk() (*int32, bool) {
|
|
if o == nil || IsNil(o.TotalPastTriggers) {
|
|
return nil, false
|
|
}
|
|
return o.TotalPastTriggers, true
|
|
}
|
|
|
|
// HasTotalPastTriggers returns a boolean if a field has been set.
|
|
func (o *O11yStats) HasTotalPastTriggers() bool {
|
|
if o != nil && !IsNil(o.TotalPastTriggers) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetTotalPastTriggers gets a reference to the given int32 and assigns it to the TotalPastTriggers field.
|
|
func (o *O11yStats) SetTotalPastTriggers(v int32) {
|
|
o.TotalPastTriggers = &v
|
|
}
|
|
|
|
func (o O11yStats) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o O11yStats) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.CurrentAvgResolutionTime) {
|
|
toSerialize["currentAvgResolutionTime"] = o.CurrentAvgResolutionTime
|
|
}
|
|
if !IsNil(o.CurrentAvgResolutionTimeSeries) {
|
|
toSerialize["currentAvgResolutionTimeSeries"] = o.CurrentAvgResolutionTimeSeries
|
|
}
|
|
if !IsNil(o.CurrentTriggersSeries) {
|
|
toSerialize["currentTriggersSeries"] = o.CurrentTriggersSeries
|
|
}
|
|
if !IsNil(o.PastAvgResolutionTime) {
|
|
toSerialize["pastAvgResolutionTime"] = o.PastAvgResolutionTime
|
|
}
|
|
if !IsNil(o.PastAvgResolutionTimeSeries) {
|
|
toSerialize["pastAvgResolutionTimeSeries"] = o.PastAvgResolutionTimeSeries
|
|
}
|
|
if !IsNil(o.PastTriggersSeries) {
|
|
toSerialize["pastTriggersSeries"] = o.PastTriggersSeries
|
|
}
|
|
if !IsNil(o.TotalCurrentTriggers) {
|
|
toSerialize["totalCurrentTriggers"] = o.TotalCurrentTriggers
|
|
}
|
|
if !IsNil(o.TotalPastTriggers) {
|
|
toSerialize["totalPastTriggers"] = o.TotalPastTriggers
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *O11yStats) UnmarshalJSON(data []byte) (err error) {
|
|
varO11yStats := _O11yStats{}
|
|
|
|
err = json.Unmarshal(data, &varO11yStats)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = O11yStats(varO11yStats)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "currentAvgResolutionTime")
|
|
delete(additionalProperties, "currentAvgResolutionTimeSeries")
|
|
delete(additionalProperties, "currentTriggersSeries")
|
|
delete(additionalProperties, "pastAvgResolutionTime")
|
|
delete(additionalProperties, "pastAvgResolutionTimeSeries")
|
|
delete(additionalProperties, "pastTriggersSeries")
|
|
delete(additionalProperties, "totalCurrentTriggers")
|
|
delete(additionalProperties, "totalPastTriggers")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableO11yStats struct {
|
|
value *O11yStats
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableO11yStats) Get() *O11yStats {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableO11yStats) Set(val *O11yStats) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableO11yStats) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableO11yStats) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableO11yStats(val *O11yStats) *NullableO11yStats {
|
|
return &NullableO11yStats{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableO11yStats) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableO11yStats) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|