Files
sdk/model_trust_update_list.go

155 lines
4.0 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 TrustUpdateList type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &TrustUpdateList{}
// TrustUpdateList struct for TrustUpdateList
type TrustUpdateList struct {
// Updates is the entries, each carrying the date it describes.
Updates []interface{} `json:"updates,omitempty"`
AdditionalProperties map[string]interface{}
}
type _TrustUpdateList TrustUpdateList
// NewTrustUpdateList instantiates a new TrustUpdateList 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 NewTrustUpdateList() *TrustUpdateList {
this := TrustUpdateList{}
return &this
}
// NewTrustUpdateListWithDefaults instantiates a new TrustUpdateList 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 NewTrustUpdateListWithDefaults() *TrustUpdateList {
this := TrustUpdateList{}
return &this
}
// GetUpdates returns the Updates field value if set, zero value otherwise.
func (o *TrustUpdateList) GetUpdates() []interface{} {
if o == nil || IsNil(o.Updates) {
var ret []interface{}
return ret
}
return o.Updates
}
// GetUpdatesOk returns a tuple with the Updates field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *TrustUpdateList) GetUpdatesOk() ([]interface{}, bool) {
if o == nil || IsNil(o.Updates) {
return nil, false
}
return o.Updates, true
}
// HasUpdates returns a boolean if a field has been set.
func (o *TrustUpdateList) HasUpdates() bool {
if o != nil && !IsNil(o.Updates) {
return true
}
return false
}
// SetUpdates gets a reference to the given []interface{} and assigns it to the Updates field.
func (o *TrustUpdateList) SetUpdates(v []interface{}) {
o.Updates = v
}
func (o TrustUpdateList) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o TrustUpdateList) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Updates) {
toSerialize["updates"] = o.Updates
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *TrustUpdateList) UnmarshalJSON(data []byte) (err error) {
varTrustUpdateList := _TrustUpdateList{}
err = json.Unmarshal(data, &varTrustUpdateList)
if err != nil {
return err
}
*o = TrustUpdateList(varTrustUpdateList)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "updates")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableTrustUpdateList struct {
value *TrustUpdateList
isSet bool
}
func (v NullableTrustUpdateList) Get() *TrustUpdateList {
return v.value
}
func (v *NullableTrustUpdateList) Set(val *TrustUpdateList) {
v.value = val
v.isSet = true
}
func (v NullableTrustUpdateList) IsSet() bool {
return v.isSet
}
func (v *NullableTrustUpdateList) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableTrustUpdateList(val *TrustUpdateList) *NullableTrustUpdateList {
return &NullableTrustUpdateList{value: val, isSet: true}
}
func (v NullableTrustUpdateList) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableTrustUpdateList) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}