Files
sdk/model_reference_reference_sets_out.go

231 lines
6.5 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 ReferenceReferenceSetsOut type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &ReferenceReferenceSetsOut{}
// ReferenceReferenceSetsOut struct for ReferenceReferenceSetsOut
type ReferenceReferenceSetsOut struct {
// Refused names the sets that cannot be consulted at all. A key checked against one of these is UNKNOWN, not clean.
Refused []string `json:"refused,omitempty"`
// Sets is the whole catalog, in a stable order.
Sets []ReferenceReferenceSet `json:"sets,omitempty"`
// Stale names the sets past their freshness bound — the list to alarm on.
Stale []string `json:"stale,omitempty"`
AdditionalProperties map[string]interface{}
}
type _ReferenceReferenceSetsOut ReferenceReferenceSetsOut
// NewReferenceReferenceSetsOut instantiates a new ReferenceReferenceSetsOut 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 NewReferenceReferenceSetsOut() *ReferenceReferenceSetsOut {
this := ReferenceReferenceSetsOut{}
return &this
}
// NewReferenceReferenceSetsOutWithDefaults instantiates a new ReferenceReferenceSetsOut 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 NewReferenceReferenceSetsOutWithDefaults() *ReferenceReferenceSetsOut {
this := ReferenceReferenceSetsOut{}
return &this
}
// GetRefused returns the Refused field value if set, zero value otherwise.
func (o *ReferenceReferenceSetsOut) GetRefused() []string {
if o == nil || IsNil(o.Refused) {
var ret []string
return ret
}
return o.Refused
}
// GetRefusedOk returns a tuple with the Refused field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ReferenceReferenceSetsOut) GetRefusedOk() ([]string, bool) {
if o == nil || IsNil(o.Refused) {
return nil, false
}
return o.Refused, true
}
// HasRefused returns a boolean if a field has been set.
func (o *ReferenceReferenceSetsOut) HasRefused() bool {
if o != nil && !IsNil(o.Refused) {
return true
}
return false
}
// SetRefused gets a reference to the given []string and assigns it to the Refused field.
func (o *ReferenceReferenceSetsOut) SetRefused(v []string) {
o.Refused = v
}
// GetSets returns the Sets field value if set, zero value otherwise.
func (o *ReferenceReferenceSetsOut) GetSets() []ReferenceReferenceSet {
if o == nil || IsNil(o.Sets) {
var ret []ReferenceReferenceSet
return ret
}
return o.Sets
}
// GetSetsOk returns a tuple with the Sets field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ReferenceReferenceSetsOut) GetSetsOk() ([]ReferenceReferenceSet, bool) {
if o == nil || IsNil(o.Sets) {
return nil, false
}
return o.Sets, true
}
// HasSets returns a boolean if a field has been set.
func (o *ReferenceReferenceSetsOut) HasSets() bool {
if o != nil && !IsNil(o.Sets) {
return true
}
return false
}
// SetSets gets a reference to the given []ReferenceReferenceSet and assigns it to the Sets field.
func (o *ReferenceReferenceSetsOut) SetSets(v []ReferenceReferenceSet) {
o.Sets = v
}
// GetStale returns the Stale field value if set, zero value otherwise.
func (o *ReferenceReferenceSetsOut) GetStale() []string {
if o == nil || IsNil(o.Stale) {
var ret []string
return ret
}
return o.Stale
}
// GetStaleOk returns a tuple with the Stale field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ReferenceReferenceSetsOut) GetStaleOk() ([]string, bool) {
if o == nil || IsNil(o.Stale) {
return nil, false
}
return o.Stale, true
}
// HasStale returns a boolean if a field has been set.
func (o *ReferenceReferenceSetsOut) HasStale() bool {
if o != nil && !IsNil(o.Stale) {
return true
}
return false
}
// SetStale gets a reference to the given []string and assigns it to the Stale field.
func (o *ReferenceReferenceSetsOut) SetStale(v []string) {
o.Stale = v
}
func (o ReferenceReferenceSetsOut) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o ReferenceReferenceSetsOut) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Refused) {
toSerialize["refused"] = o.Refused
}
if !IsNil(o.Sets) {
toSerialize["sets"] = o.Sets
}
if !IsNil(o.Stale) {
toSerialize["stale"] = o.Stale
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *ReferenceReferenceSetsOut) UnmarshalJSON(data []byte) (err error) {
varReferenceReferenceSetsOut := _ReferenceReferenceSetsOut{}
err = json.Unmarshal(data, &varReferenceReferenceSetsOut)
if err != nil {
return err
}
*o = ReferenceReferenceSetsOut(varReferenceReferenceSetsOut)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "refused")
delete(additionalProperties, "sets")
delete(additionalProperties, "stale")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableReferenceReferenceSetsOut struct {
value *ReferenceReferenceSetsOut
isSet bool
}
func (v NullableReferenceReferenceSetsOut) Get() *ReferenceReferenceSetsOut {
return v.value
}
func (v *NullableReferenceReferenceSetsOut) Set(val *ReferenceReferenceSetsOut) {
v.value = val
v.isSet = true
}
func (v NullableReferenceReferenceSetsOut) IsSet() bool {
return v.isSet
}
func (v *NullableReferenceReferenceSetsOut) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableReferenceReferenceSetsOut(val *ReferenceReferenceSetsOut) *NullableReferenceReferenceSetsOut {
return &NullableReferenceReferenceSetsOut{value: val, isSet: true}
}
func (v NullableReferenceReferenceSetsOut) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableReferenceReferenceSetsOut) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}