Files
sdk/model_agent_activity_feed.go

155 lines
4.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 AgentActivityFeed type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &AgentActivityFeed{}
// AgentActivityFeed struct for AgentActivityFeed
type AgentActivityFeed struct {
// Activity is the merged run/create/update events, newest first, capped at 50.
Activity []AgentActivityView `json:"activity,omitempty"`
AdditionalProperties map[string]interface{}
}
type _AgentActivityFeed AgentActivityFeed
// NewAgentActivityFeed instantiates a new AgentActivityFeed 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 NewAgentActivityFeed() *AgentActivityFeed {
this := AgentActivityFeed{}
return &this
}
// NewAgentActivityFeedWithDefaults instantiates a new AgentActivityFeed 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 NewAgentActivityFeedWithDefaults() *AgentActivityFeed {
this := AgentActivityFeed{}
return &this
}
// GetActivity returns the Activity field value if set, zero value otherwise.
func (o *AgentActivityFeed) GetActivity() []AgentActivityView {
if o == nil || IsNil(o.Activity) {
var ret []AgentActivityView
return ret
}
return o.Activity
}
// GetActivityOk returns a tuple with the Activity field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AgentActivityFeed) GetActivityOk() ([]AgentActivityView, bool) {
if o == nil || IsNil(o.Activity) {
return nil, false
}
return o.Activity, true
}
// HasActivity returns a boolean if a field has been set.
func (o *AgentActivityFeed) HasActivity() bool {
if o != nil && !IsNil(o.Activity) {
return true
}
return false
}
// SetActivity gets a reference to the given []AgentActivityView and assigns it to the Activity field.
func (o *AgentActivityFeed) SetActivity(v []AgentActivityView) {
o.Activity = v
}
func (o AgentActivityFeed) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o AgentActivityFeed) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Activity) {
toSerialize["activity"] = o.Activity
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *AgentActivityFeed) UnmarshalJSON(data []byte) (err error) {
varAgentActivityFeed := _AgentActivityFeed{}
err = json.Unmarshal(data, &varAgentActivityFeed)
if err != nil {
return err
}
*o = AgentActivityFeed(varAgentActivityFeed)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "activity")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableAgentActivityFeed struct {
value *AgentActivityFeed
isSet bool
}
func (v NullableAgentActivityFeed) Get() *AgentActivityFeed {
return v.value
}
func (v *NullableAgentActivityFeed) Set(val *AgentActivityFeed) {
v.value = val
v.isSet = true
}
func (v NullableAgentActivityFeed) IsSet() bool {
return v.isSet
}
func (v *NullableAgentActivityFeed) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableAgentActivityFeed(val *AgentActivityFeed) *NullableAgentActivityFeed {
return &NullableAgentActivityFeed{value: val, isSet: true}
}
func (v NullableAgentActivityFeed) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableAgentActivityFeed) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}