Files
sdk/model_agent_report_out.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 AgentReportOut type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &AgentReportOut{}
// AgentReportOut struct for AgentReportOut
type AgentReportOut struct {
// Delivered is true when a waiting durable owner received this result. False means there was none to deliver to — an unknown or already-finished run — which is a clean no-op, not an error.
Delivered *bool `json:"delivered,omitempty"`
AdditionalProperties map[string]interface{}
}
type _AgentReportOut AgentReportOut
// NewAgentReportOut instantiates a new AgentReportOut 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 NewAgentReportOut() *AgentReportOut {
this := AgentReportOut{}
return &this
}
// NewAgentReportOutWithDefaults instantiates a new AgentReportOut 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 NewAgentReportOutWithDefaults() *AgentReportOut {
this := AgentReportOut{}
return &this
}
// GetDelivered returns the Delivered field value if set, zero value otherwise.
func (o *AgentReportOut) GetDelivered() bool {
if o == nil || IsNil(o.Delivered) {
var ret bool
return ret
}
return *o.Delivered
}
// GetDeliveredOk returns a tuple with the Delivered field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AgentReportOut) GetDeliveredOk() (*bool, bool) {
if o == nil || IsNil(o.Delivered) {
return nil, false
}
return o.Delivered, true
}
// HasDelivered returns a boolean if a field has been set.
func (o *AgentReportOut) HasDelivered() bool {
if o != nil && !IsNil(o.Delivered) {
return true
}
return false
}
// SetDelivered gets a reference to the given bool and assigns it to the Delivered field.
func (o *AgentReportOut) SetDelivered(v bool) {
o.Delivered = &v
}
func (o AgentReportOut) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o AgentReportOut) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Delivered) {
toSerialize["delivered"] = o.Delivered
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *AgentReportOut) UnmarshalJSON(data []byte) (err error) {
varAgentReportOut := _AgentReportOut{}
err = json.Unmarshal(data, &varAgentReportOut)
if err != nil {
return err
}
*o = AgentReportOut(varAgentReportOut)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "delivered")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableAgentReportOut struct {
value *AgentReportOut
isSet bool
}
func (v NullableAgentReportOut) Get() *AgentReportOut {
return v.value
}
func (v *NullableAgentReportOut) Set(val *AgentReportOut) {
v.value = val
v.isSet = true
}
func (v NullableAgentReportOut) IsSet() bool {
return v.isSet
}
func (v *NullableAgentReportOut) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableAgentReportOut(val *AgentReportOut) *NullableAgentReportOut {
return &NullableAgentReportOut{value: val, isSet: true}
}
func (v NullableAgentReportOut) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableAgentReportOut) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}