mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
193 lines
4.9 KiB
Go
193 lines
4.9 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 AgentEventList type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &AgentEventList{}
|
|
|
|
// AgentEventList struct for AgentEventList
|
|
type AgentEventList struct {
|
|
// Events is the page, in seq order.
|
|
Events []AgentEventView `json:"events,omitempty"`
|
|
// Next is the seq to pass as after for the page beyond this one; absent when this page reached the end of the log as it stands now.
|
|
Next *int64 `json:"next,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _AgentEventList AgentEventList
|
|
|
|
// NewAgentEventList instantiates a new AgentEventList 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 NewAgentEventList() *AgentEventList {
|
|
this := AgentEventList{}
|
|
return &this
|
|
}
|
|
|
|
// NewAgentEventListWithDefaults instantiates a new AgentEventList 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 NewAgentEventListWithDefaults() *AgentEventList {
|
|
this := AgentEventList{}
|
|
return &this
|
|
}
|
|
|
|
// GetEvents returns the Events field value if set, zero value otherwise.
|
|
func (o *AgentEventList) GetEvents() []AgentEventView {
|
|
if o == nil || IsNil(o.Events) {
|
|
var ret []AgentEventView
|
|
return ret
|
|
}
|
|
return o.Events
|
|
}
|
|
|
|
// GetEventsOk returns a tuple with the Events field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AgentEventList) GetEventsOk() ([]AgentEventView, bool) {
|
|
if o == nil || IsNil(o.Events) {
|
|
return nil, false
|
|
}
|
|
return o.Events, true
|
|
}
|
|
|
|
// HasEvents returns a boolean if a field has been set.
|
|
func (o *AgentEventList) HasEvents() bool {
|
|
if o != nil && !IsNil(o.Events) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetEvents gets a reference to the given []AgentEventView and assigns it to the Events field.
|
|
func (o *AgentEventList) SetEvents(v []AgentEventView) {
|
|
o.Events = v
|
|
}
|
|
|
|
// GetNext returns the Next field value if set, zero value otherwise.
|
|
func (o *AgentEventList) GetNext() int64 {
|
|
if o == nil || IsNil(o.Next) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.Next
|
|
}
|
|
|
|
// GetNextOk returns a tuple with the Next field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AgentEventList) GetNextOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.Next) {
|
|
return nil, false
|
|
}
|
|
return o.Next, true
|
|
}
|
|
|
|
// HasNext returns a boolean if a field has been set.
|
|
func (o *AgentEventList) HasNext() bool {
|
|
if o != nil && !IsNil(o.Next) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetNext gets a reference to the given int64 and assigns it to the Next field.
|
|
func (o *AgentEventList) SetNext(v int64) {
|
|
o.Next = &v
|
|
}
|
|
|
|
func (o AgentEventList) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o AgentEventList) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Events) {
|
|
toSerialize["events"] = o.Events
|
|
}
|
|
if !IsNil(o.Next) {
|
|
toSerialize["next"] = o.Next
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *AgentEventList) UnmarshalJSON(data []byte) (err error) {
|
|
varAgentEventList := _AgentEventList{}
|
|
|
|
err = json.Unmarshal(data, &varAgentEventList)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = AgentEventList(varAgentEventList)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "events")
|
|
delete(additionalProperties, "next")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableAgentEventList struct {
|
|
value *AgentEventList
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableAgentEventList) Get() *AgentEventList {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableAgentEventList) Set(val *AgentEventList) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableAgentEventList) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableAgentEventList) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableAgentEventList(val *AgentEventList) *NullableAgentEventList {
|
|
return &NullableAgentEventList{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableAgentEventList) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableAgentEventList) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|