mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
383 lines
9.9 KiB
Go
383 lines
9.9 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 ExplorerOracleView type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &ExplorerOracleView{}
|
|
|
|
// ExplorerOracleView struct for ExplorerOracleView
|
|
type ExplorerOracleView struct {
|
|
// Feed is the trading pair this feed prices.
|
|
Feed *string `json:"feed,omitempty"`
|
|
// ID is the feed's own id, else its trading pair.
|
|
Id *string `json:"id,omitempty"`
|
|
// Name is the feed's display name — the trading pair, e.g. \"LUX/USD\".
|
|
Name *string `json:"name,omitempty"`
|
|
// Source is the oracle network the feed originates from; \"O-Chain\" by default.
|
|
Source *string `json:"source,omitempty"`
|
|
// Status is \"active\" for a listed feed.
|
|
Status *string `json:"status,omitempty"`
|
|
// UpdatedAt is the feed's own timestamp, RFC 3339 UTC.
|
|
UpdatedAt *string `json:"updatedAt,omitempty"`
|
|
// Value is the feed's price, verbatim as the registry carries it.
|
|
Value *string `json:"value,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _ExplorerOracleView ExplorerOracleView
|
|
|
|
// NewExplorerOracleView instantiates a new ExplorerOracleView 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 NewExplorerOracleView() *ExplorerOracleView {
|
|
this := ExplorerOracleView{}
|
|
return &this
|
|
}
|
|
|
|
// NewExplorerOracleViewWithDefaults instantiates a new ExplorerOracleView 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 NewExplorerOracleViewWithDefaults() *ExplorerOracleView {
|
|
this := ExplorerOracleView{}
|
|
return &this
|
|
}
|
|
|
|
// GetFeed returns the Feed field value if set, zero value otherwise.
|
|
func (o *ExplorerOracleView) GetFeed() string {
|
|
if o == nil || IsNil(o.Feed) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Feed
|
|
}
|
|
|
|
// GetFeedOk returns a tuple with the Feed field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ExplorerOracleView) GetFeedOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Feed) {
|
|
return nil, false
|
|
}
|
|
return o.Feed, true
|
|
}
|
|
|
|
// HasFeed returns a boolean if a field has been set.
|
|
func (o *ExplorerOracleView) HasFeed() bool {
|
|
if o != nil && !IsNil(o.Feed) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetFeed gets a reference to the given string and assigns it to the Feed field.
|
|
func (o *ExplorerOracleView) SetFeed(v string) {
|
|
o.Feed = &v
|
|
}
|
|
|
|
// GetId returns the Id field value if set, zero value otherwise.
|
|
func (o *ExplorerOracleView) GetId() string {
|
|
if o == nil || IsNil(o.Id) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Id
|
|
}
|
|
|
|
// GetIdOk returns a tuple with the Id field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ExplorerOracleView) GetIdOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Id) {
|
|
return nil, false
|
|
}
|
|
return o.Id, true
|
|
}
|
|
|
|
// HasId returns a boolean if a field has been set.
|
|
func (o *ExplorerOracleView) HasId() bool {
|
|
if o != nil && !IsNil(o.Id) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetId gets a reference to the given string and assigns it to the Id field.
|
|
func (o *ExplorerOracleView) SetId(v string) {
|
|
o.Id = &v
|
|
}
|
|
|
|
// GetName returns the Name field value if set, zero value otherwise.
|
|
func (o *ExplorerOracleView) GetName() string {
|
|
if o == nil || IsNil(o.Name) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Name
|
|
}
|
|
|
|
// GetNameOk returns a tuple with the Name field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ExplorerOracleView) GetNameOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Name) {
|
|
return nil, false
|
|
}
|
|
return o.Name, true
|
|
}
|
|
|
|
// HasName returns a boolean if a field has been set.
|
|
func (o *ExplorerOracleView) HasName() bool {
|
|
if o != nil && !IsNil(o.Name) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetName gets a reference to the given string and assigns it to the Name field.
|
|
func (o *ExplorerOracleView) SetName(v string) {
|
|
o.Name = &v
|
|
}
|
|
|
|
// GetSource returns the Source field value if set, zero value otherwise.
|
|
func (o *ExplorerOracleView) GetSource() string {
|
|
if o == nil || IsNil(o.Source) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Source
|
|
}
|
|
|
|
// GetSourceOk returns a tuple with the Source field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ExplorerOracleView) GetSourceOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Source) {
|
|
return nil, false
|
|
}
|
|
return o.Source, true
|
|
}
|
|
|
|
// HasSource returns a boolean if a field has been set.
|
|
func (o *ExplorerOracleView) HasSource() bool {
|
|
if o != nil && !IsNil(o.Source) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetSource gets a reference to the given string and assigns it to the Source field.
|
|
func (o *ExplorerOracleView) SetSource(v string) {
|
|
o.Source = &v
|
|
}
|
|
|
|
// GetStatus returns the Status field value if set, zero value otherwise.
|
|
func (o *ExplorerOracleView) GetStatus() string {
|
|
if o == nil || IsNil(o.Status) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Status
|
|
}
|
|
|
|
// GetStatusOk returns a tuple with the Status field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ExplorerOracleView) GetStatusOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Status) {
|
|
return nil, false
|
|
}
|
|
return o.Status, true
|
|
}
|
|
|
|
// HasStatus returns a boolean if a field has been set.
|
|
func (o *ExplorerOracleView) HasStatus() bool {
|
|
if o != nil && !IsNil(o.Status) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetStatus gets a reference to the given string and assigns it to the Status field.
|
|
func (o *ExplorerOracleView) SetStatus(v string) {
|
|
o.Status = &v
|
|
}
|
|
|
|
// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise.
|
|
func (o *ExplorerOracleView) GetUpdatedAt() string {
|
|
if o == nil || IsNil(o.UpdatedAt) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.UpdatedAt
|
|
}
|
|
|
|
// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ExplorerOracleView) GetUpdatedAtOk() (*string, bool) {
|
|
if o == nil || IsNil(o.UpdatedAt) {
|
|
return nil, false
|
|
}
|
|
return o.UpdatedAt, true
|
|
}
|
|
|
|
// HasUpdatedAt returns a boolean if a field has been set.
|
|
func (o *ExplorerOracleView) HasUpdatedAt() bool {
|
|
if o != nil && !IsNil(o.UpdatedAt) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetUpdatedAt gets a reference to the given string and assigns it to the UpdatedAt field.
|
|
func (o *ExplorerOracleView) SetUpdatedAt(v string) {
|
|
o.UpdatedAt = &v
|
|
}
|
|
|
|
// GetValue returns the Value field value if set, zero value otherwise.
|
|
func (o *ExplorerOracleView) GetValue() string {
|
|
if o == nil || IsNil(o.Value) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Value
|
|
}
|
|
|
|
// GetValueOk returns a tuple with the Value field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ExplorerOracleView) GetValueOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Value) {
|
|
return nil, false
|
|
}
|
|
return o.Value, true
|
|
}
|
|
|
|
// HasValue returns a boolean if a field has been set.
|
|
func (o *ExplorerOracleView) HasValue() bool {
|
|
if o != nil && !IsNil(o.Value) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetValue gets a reference to the given string and assigns it to the Value field.
|
|
func (o *ExplorerOracleView) SetValue(v string) {
|
|
o.Value = &v
|
|
}
|
|
|
|
func (o ExplorerOracleView) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o ExplorerOracleView) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Feed) {
|
|
toSerialize["feed"] = o.Feed
|
|
}
|
|
if !IsNil(o.Id) {
|
|
toSerialize["id"] = o.Id
|
|
}
|
|
if !IsNil(o.Name) {
|
|
toSerialize["name"] = o.Name
|
|
}
|
|
if !IsNil(o.Source) {
|
|
toSerialize["source"] = o.Source
|
|
}
|
|
if !IsNil(o.Status) {
|
|
toSerialize["status"] = o.Status
|
|
}
|
|
if !IsNil(o.UpdatedAt) {
|
|
toSerialize["updatedAt"] = o.UpdatedAt
|
|
}
|
|
if !IsNil(o.Value) {
|
|
toSerialize["value"] = o.Value
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *ExplorerOracleView) UnmarshalJSON(data []byte) (err error) {
|
|
varExplorerOracleView := _ExplorerOracleView{}
|
|
|
|
err = json.Unmarshal(data, &varExplorerOracleView)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = ExplorerOracleView(varExplorerOracleView)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "feed")
|
|
delete(additionalProperties, "id")
|
|
delete(additionalProperties, "name")
|
|
delete(additionalProperties, "source")
|
|
delete(additionalProperties, "status")
|
|
delete(additionalProperties, "updatedAt")
|
|
delete(additionalProperties, "value")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableExplorerOracleView struct {
|
|
value *ExplorerOracleView
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableExplorerOracleView) Get() *ExplorerOracleView {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableExplorerOracleView) Set(val *ExplorerOracleView) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableExplorerOracleView) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableExplorerOracleView) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableExplorerOracleView(val *ExplorerOracleView) *NullableExplorerOracleView {
|
|
return &NullableExplorerOracleView{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableExplorerOracleView) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableExplorerOracleView) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|