mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
303 lines
8.2 KiB
Go
303 lines
8.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 O11yNamespaces type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &O11yNamespaces{}
|
|
|
|
// O11yNamespaces struct for O11yNamespaces
|
|
type O11yNamespaces struct {
|
|
EndTimeBeforeRetention *bool `json:"endTimeBeforeRetention,omitempty"`
|
|
Records []O11yNamespaceRecord `json:"records,omitempty"`
|
|
Total *int64 `json:"total,omitempty"`
|
|
Type interface{} `json:"type,omitempty"`
|
|
Warning *O11yQueryWarnData `json:"warning,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _O11yNamespaces O11yNamespaces
|
|
|
|
// NewO11yNamespaces instantiates a new O11yNamespaces 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 NewO11yNamespaces() *O11yNamespaces {
|
|
this := O11yNamespaces{}
|
|
return &this
|
|
}
|
|
|
|
// NewO11yNamespacesWithDefaults instantiates a new O11yNamespaces 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 NewO11yNamespacesWithDefaults() *O11yNamespaces {
|
|
this := O11yNamespaces{}
|
|
return &this
|
|
}
|
|
|
|
// GetEndTimeBeforeRetention returns the EndTimeBeforeRetention field value if set, zero value otherwise.
|
|
func (o *O11yNamespaces) GetEndTimeBeforeRetention() bool {
|
|
if o == nil || IsNil(o.EndTimeBeforeRetention) {
|
|
var ret bool
|
|
return ret
|
|
}
|
|
return *o.EndTimeBeforeRetention
|
|
}
|
|
|
|
// GetEndTimeBeforeRetentionOk returns a tuple with the EndTimeBeforeRetention field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *O11yNamespaces) GetEndTimeBeforeRetentionOk() (*bool, bool) {
|
|
if o == nil || IsNil(o.EndTimeBeforeRetention) {
|
|
return nil, false
|
|
}
|
|
return o.EndTimeBeforeRetention, true
|
|
}
|
|
|
|
// HasEndTimeBeforeRetention returns a boolean if a field has been set.
|
|
func (o *O11yNamespaces) HasEndTimeBeforeRetention() bool {
|
|
if o != nil && !IsNil(o.EndTimeBeforeRetention) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetEndTimeBeforeRetention gets a reference to the given bool and assigns it to the EndTimeBeforeRetention field.
|
|
func (o *O11yNamespaces) SetEndTimeBeforeRetention(v bool) {
|
|
o.EndTimeBeforeRetention = &v
|
|
}
|
|
|
|
// GetRecords returns the Records field value if set, zero value otherwise.
|
|
func (o *O11yNamespaces) GetRecords() []O11yNamespaceRecord {
|
|
if o == nil || IsNil(o.Records) {
|
|
var ret []O11yNamespaceRecord
|
|
return ret
|
|
}
|
|
return o.Records
|
|
}
|
|
|
|
// GetRecordsOk returns a tuple with the Records field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *O11yNamespaces) GetRecordsOk() ([]O11yNamespaceRecord, bool) {
|
|
if o == nil || IsNil(o.Records) {
|
|
return nil, false
|
|
}
|
|
return o.Records, true
|
|
}
|
|
|
|
// HasRecords returns a boolean if a field has been set.
|
|
func (o *O11yNamespaces) HasRecords() bool {
|
|
if o != nil && !IsNil(o.Records) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetRecords gets a reference to the given []O11yNamespaceRecord and assigns it to the Records field.
|
|
func (o *O11yNamespaces) SetRecords(v []O11yNamespaceRecord) {
|
|
o.Records = v
|
|
}
|
|
|
|
// GetTotal returns the Total field value if set, zero value otherwise.
|
|
func (o *O11yNamespaces) GetTotal() int64 {
|
|
if o == nil || IsNil(o.Total) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.Total
|
|
}
|
|
|
|
// GetTotalOk returns a tuple with the Total field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *O11yNamespaces) GetTotalOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.Total) {
|
|
return nil, false
|
|
}
|
|
return o.Total, true
|
|
}
|
|
|
|
// HasTotal returns a boolean if a field has been set.
|
|
func (o *O11yNamespaces) HasTotal() bool {
|
|
if o != nil && !IsNil(o.Total) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetTotal gets a reference to the given int64 and assigns it to the Total field.
|
|
func (o *O11yNamespaces) SetTotal(v int64) {
|
|
o.Total = &v
|
|
}
|
|
|
|
// GetType returns the Type field value if set, zero value otherwise (both if not set or set to explicit null).
|
|
func (o *O11yNamespaces) GetType() interface{} {
|
|
if o == nil {
|
|
var ret interface{}
|
|
return ret
|
|
}
|
|
return o.Type
|
|
}
|
|
|
|
// GetTypeOk returns a tuple with the Type field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
// NOTE: If the value is an explicit nil, `nil, true` will be returned
|
|
func (o *O11yNamespaces) GetTypeOk() (*interface{}, bool) {
|
|
if o == nil || IsNil(o.Type) {
|
|
return nil, false
|
|
}
|
|
return &o.Type, true
|
|
}
|
|
|
|
// HasType returns a boolean if a field has been set.
|
|
func (o *O11yNamespaces) HasType() bool {
|
|
if o != nil && !IsNil(o.Type) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetType gets a reference to the given interface{} and assigns it to the Type field.
|
|
func (o *O11yNamespaces) SetType(v interface{}) {
|
|
o.Type = v
|
|
}
|
|
|
|
// GetWarning returns the Warning field value if set, zero value otherwise.
|
|
func (o *O11yNamespaces) GetWarning() O11yQueryWarnData {
|
|
if o == nil || IsNil(o.Warning) {
|
|
var ret O11yQueryWarnData
|
|
return ret
|
|
}
|
|
return *o.Warning
|
|
}
|
|
|
|
// GetWarningOk returns a tuple with the Warning field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *O11yNamespaces) GetWarningOk() (*O11yQueryWarnData, bool) {
|
|
if o == nil || IsNil(o.Warning) {
|
|
return nil, false
|
|
}
|
|
return o.Warning, true
|
|
}
|
|
|
|
// HasWarning returns a boolean if a field has been set.
|
|
func (o *O11yNamespaces) HasWarning() bool {
|
|
if o != nil && !IsNil(o.Warning) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetWarning gets a reference to the given O11yQueryWarnData and assigns it to the Warning field.
|
|
func (o *O11yNamespaces) SetWarning(v O11yQueryWarnData) {
|
|
o.Warning = &v
|
|
}
|
|
|
|
func (o O11yNamespaces) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o O11yNamespaces) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.EndTimeBeforeRetention) {
|
|
toSerialize["endTimeBeforeRetention"] = o.EndTimeBeforeRetention
|
|
}
|
|
if !IsNil(o.Records) {
|
|
toSerialize["records"] = o.Records
|
|
}
|
|
if !IsNil(o.Total) {
|
|
toSerialize["total"] = o.Total
|
|
}
|
|
if o.Type != nil {
|
|
toSerialize["type"] = o.Type
|
|
}
|
|
if !IsNil(o.Warning) {
|
|
toSerialize["warning"] = o.Warning
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *O11yNamespaces) UnmarshalJSON(data []byte) (err error) {
|
|
varO11yNamespaces := _O11yNamespaces{}
|
|
|
|
err = json.Unmarshal(data, &varO11yNamespaces)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = O11yNamespaces(varO11yNamespaces)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "endTimeBeforeRetention")
|
|
delete(additionalProperties, "records")
|
|
delete(additionalProperties, "total")
|
|
delete(additionalProperties, "type")
|
|
delete(additionalProperties, "warning")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableO11yNamespaces struct {
|
|
value *O11yNamespaces
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableO11yNamespaces) Get() *O11yNamespaces {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableO11yNamespaces) Set(val *O11yNamespaces) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableO11yNamespaces) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableO11yNamespaces) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableO11yNamespaces(val *O11yNamespaces) *NullableO11yNamespaces {
|
|
return &NullableO11yNamespaces{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableO11yNamespaces) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableO11yNamespaces) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|