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 O11yProcessListResponse type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &O11yProcessListResponse{}
|
|
|
|
// O11yProcessListResponse struct for O11yProcessListResponse
|
|
type O11yProcessListResponse struct {
|
|
Records []O11yProcessListRecord `json:"records,omitempty"`
|
|
Total *int64 `json:"total,omitempty"`
|
|
Type *string `json:"type,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _O11yProcessListResponse O11yProcessListResponse
|
|
|
|
// NewO11yProcessListResponse instantiates a new O11yProcessListResponse 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 NewO11yProcessListResponse() *O11yProcessListResponse {
|
|
this := O11yProcessListResponse{}
|
|
return &this
|
|
}
|
|
|
|
// NewO11yProcessListResponseWithDefaults instantiates a new O11yProcessListResponse 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 NewO11yProcessListResponseWithDefaults() *O11yProcessListResponse {
|
|
this := O11yProcessListResponse{}
|
|
return &this
|
|
}
|
|
|
|
// GetRecords returns the Records field value if set, zero value otherwise.
|
|
func (o *O11yProcessListResponse) GetRecords() []O11yProcessListRecord {
|
|
if o == nil || IsNil(o.Records) {
|
|
var ret []O11yProcessListRecord
|
|
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 *O11yProcessListResponse) GetRecordsOk() ([]O11yProcessListRecord, 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 *O11yProcessListResponse) HasRecords() bool {
|
|
if o != nil && !IsNil(o.Records) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetRecords gets a reference to the given []O11yProcessListRecord and assigns it to the Records field.
|
|
func (o *O11yProcessListResponse) SetRecords(v []O11yProcessListRecord) {
|
|
o.Records = v
|
|
}
|
|
|
|
// GetTotal returns the Total field value if set, zero value otherwise.
|
|
func (o *O11yProcessListResponse) 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 *O11yProcessListResponse) 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 *O11yProcessListResponse) 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 *O11yProcessListResponse) SetTotal(v int64) {
|
|
o.Total = &v
|
|
}
|
|
|
|
// GetType returns the Type field value if set, zero value otherwise.
|
|
func (o *O11yProcessListResponse) 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 *O11yProcessListResponse) 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 *O11yProcessListResponse) 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 *O11yProcessListResponse) SetType(v string) {
|
|
o.Type = &v
|
|
}
|
|
|
|
func (o O11yProcessListResponse) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o O11yProcessListResponse) 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 *O11yProcessListResponse) UnmarshalJSON(data []byte) (err error) {
|
|
varO11yProcessListResponse := _O11yProcessListResponse{}
|
|
|
|
err = json.Unmarshal(data, &varO11yProcessListResponse)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = O11yProcessListResponse(varO11yProcessListResponse)
|
|
|
|
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 NullableO11yProcessListResponse struct {
|
|
value *O11yProcessListResponse
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableO11yProcessListResponse) Get() *O11yProcessListResponse {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableO11yProcessListResponse) Set(val *O11yProcessListResponse) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableO11yProcessListResponse) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableO11yProcessListResponse) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableO11yProcessListResponse(val *O11yProcessListResponse) *NullableO11yProcessListResponse {
|
|
return &NullableO11yProcessListResponse{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableO11yProcessListResponse) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableO11yProcessListResponse) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|