Files
sdk/model_explorer_oracles_out.go

155 lines
4.2 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 ExplorerOraclesOut type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &ExplorerOraclesOut{}
// ExplorerOraclesOut struct for ExplorerOraclesOut
type ExplorerOraclesOut struct {
// Oracles is one row per on-chain price feed, or an empty list when the graph is unreachable or carries none — never a fabricated feed.
Oracles []ExplorerOracleView `json:"oracles,omitempty"`
AdditionalProperties map[string]interface{}
}
type _ExplorerOraclesOut ExplorerOraclesOut
// NewExplorerOraclesOut instantiates a new ExplorerOraclesOut 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 NewExplorerOraclesOut() *ExplorerOraclesOut {
this := ExplorerOraclesOut{}
return &this
}
// NewExplorerOraclesOutWithDefaults instantiates a new ExplorerOraclesOut 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 NewExplorerOraclesOutWithDefaults() *ExplorerOraclesOut {
this := ExplorerOraclesOut{}
return &this
}
// GetOracles returns the Oracles field value if set, zero value otherwise.
func (o *ExplorerOraclesOut) GetOracles() []ExplorerOracleView {
if o == nil || IsNil(o.Oracles) {
var ret []ExplorerOracleView
return ret
}
return o.Oracles
}
// GetOraclesOk returns a tuple with the Oracles field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ExplorerOraclesOut) GetOraclesOk() ([]ExplorerOracleView, bool) {
if o == nil || IsNil(o.Oracles) {
return nil, false
}
return o.Oracles, true
}
// HasOracles returns a boolean if a field has been set.
func (o *ExplorerOraclesOut) HasOracles() bool {
if o != nil && !IsNil(o.Oracles) {
return true
}
return false
}
// SetOracles gets a reference to the given []ExplorerOracleView and assigns it to the Oracles field.
func (o *ExplorerOraclesOut) SetOracles(v []ExplorerOracleView) {
o.Oracles = v
}
func (o ExplorerOraclesOut) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o ExplorerOraclesOut) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Oracles) {
toSerialize["oracles"] = o.Oracles
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *ExplorerOraclesOut) UnmarshalJSON(data []byte) (err error) {
varExplorerOraclesOut := _ExplorerOraclesOut{}
err = json.Unmarshal(data, &varExplorerOraclesOut)
if err != nil {
return err
}
*o = ExplorerOraclesOut(varExplorerOraclesOut)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "oracles")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableExplorerOraclesOut struct {
value *ExplorerOraclesOut
isSet bool
}
func (v NullableExplorerOraclesOut) Get() *ExplorerOraclesOut {
return v.value
}
func (v *NullableExplorerOraclesOut) Set(val *ExplorerOraclesOut) {
v.value = val
v.isSet = true
}
func (v NullableExplorerOraclesOut) IsSet() bool {
return v.isSet
}
func (v *NullableExplorerOraclesOut) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableExplorerOraclesOut(val *ExplorerOraclesOut) *NullableExplorerOraclesOut {
return &NullableExplorerOraclesOut{value: val, isSet: true}
}
func (v NullableExplorerOraclesOut) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableExplorerOraclesOut) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}