mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
228 lines
6.1 KiB
Go
228 lines
6.1 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 O11yNodeListResponse type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &O11yNodeListResponse{}
|
|
|
|
// O11yNodeListResponse struct for O11yNodeListResponse
|
|
type O11yNodeListResponse struct {
|
|
Records []O11yNodeListRecord `json:"records,omitempty"`
|
|
Total *int64 `json:"total,omitempty"`
|
|
Type *string `json:"type,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _O11yNodeListResponse O11yNodeListResponse
|
|
|
|
// NewO11yNodeListResponse instantiates a new O11yNodeListResponse 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 NewO11yNodeListResponse() *O11yNodeListResponse {
|
|
this := O11yNodeListResponse{}
|
|
return &this
|
|
}
|
|
|
|
// NewO11yNodeListResponseWithDefaults instantiates a new O11yNodeListResponse 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 NewO11yNodeListResponseWithDefaults() *O11yNodeListResponse {
|
|
this := O11yNodeListResponse{}
|
|
return &this
|
|
}
|
|
|
|
// GetRecords returns the Records field value if set, zero value otherwise.
|
|
func (o *O11yNodeListResponse) GetRecords() []O11yNodeListRecord {
|
|
if o == nil || IsNil(o.Records) {
|
|
var ret []O11yNodeListRecord
|
|
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 *O11yNodeListResponse) GetRecordsOk() ([]O11yNodeListRecord, 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 *O11yNodeListResponse) HasRecords() bool {
|
|
if o != nil && !IsNil(o.Records) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetRecords gets a reference to the given []O11yNodeListRecord and assigns it to the Records field.
|
|
func (o *O11yNodeListResponse) SetRecords(v []O11yNodeListRecord) {
|
|
o.Records = v
|
|
}
|
|
|
|
// GetTotal returns the Total field value if set, zero value otherwise.
|
|
func (o *O11yNodeListResponse) 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 *O11yNodeListResponse) 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 *O11yNodeListResponse) 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 *O11yNodeListResponse) SetTotal(v int64) {
|
|
o.Total = &v
|
|
}
|
|
|
|
// GetType returns the Type field value if set, zero value otherwise.
|
|
func (o *O11yNodeListResponse) GetType() string {
|
|
if o == nil || IsNil(o.Type) {
|
|
var ret string
|
|
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.
|
|
func (o *O11yNodeListResponse) GetTypeOk() (*string, 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 *O11yNodeListResponse) HasType() bool {
|
|
if o != nil && !IsNil(o.Type) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetType gets a reference to the given string and assigns it to the Type field.
|
|
func (o *O11yNodeListResponse) SetType(v string) {
|
|
o.Type = &v
|
|
}
|
|
|
|
func (o O11yNodeListResponse) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o O11yNodeListResponse) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Records) {
|
|
toSerialize["records"] = o.Records
|
|
}
|
|
if !IsNil(o.Total) {
|
|
toSerialize["total"] = o.Total
|
|
}
|
|
if !IsNil(o.Type) {
|
|
toSerialize["type"] = o.Type
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *O11yNodeListResponse) UnmarshalJSON(data []byte) (err error) {
|
|
varO11yNodeListResponse := _O11yNodeListResponse{}
|
|
|
|
err = json.Unmarshal(data, &varO11yNodeListResponse)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = O11yNodeListResponse(varO11yNodeListResponse)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "records")
|
|
delete(additionalProperties, "total")
|
|
delete(additionalProperties, "type")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableO11yNodeListResponse struct {
|
|
value *O11yNodeListResponse
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableO11yNodeListResponse) Get() *O11yNodeListResponse {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableO11yNodeListResponse) Set(val *O11yNodeListResponse) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableO11yNodeListResponse) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableO11yNodeListResponse) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableO11yNodeListResponse(val *O11yNodeListResponse) *NullableO11yNodeListResponse {
|
|
return &NullableO11yNodeListResponse{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableO11yNodeListResponse) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableO11yNodeListResponse) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|