mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
155 lines
3.9 KiB
Go
155 lines
3.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 Web3ChainList type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &Web3ChainList{}
|
|
|
|
// Web3ChainList struct for Web3ChainList
|
|
type Web3ChainList struct {
|
|
// Chains is every chain this deployment is configured to reach, sorted by id. Empty when none are configured — never a fabricated entry.
|
|
Chains []Web3Chain `json:"chains,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _Web3ChainList Web3ChainList
|
|
|
|
// NewWeb3ChainList instantiates a new Web3ChainList 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 NewWeb3ChainList() *Web3ChainList {
|
|
this := Web3ChainList{}
|
|
return &this
|
|
}
|
|
|
|
// NewWeb3ChainListWithDefaults instantiates a new Web3ChainList 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 NewWeb3ChainListWithDefaults() *Web3ChainList {
|
|
this := Web3ChainList{}
|
|
return &this
|
|
}
|
|
|
|
// GetChains returns the Chains field value if set, zero value otherwise.
|
|
func (o *Web3ChainList) GetChains() []Web3Chain {
|
|
if o == nil || IsNil(o.Chains) {
|
|
var ret []Web3Chain
|
|
return ret
|
|
}
|
|
return o.Chains
|
|
}
|
|
|
|
// GetChainsOk returns a tuple with the Chains field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *Web3ChainList) GetChainsOk() ([]Web3Chain, bool) {
|
|
if o == nil || IsNil(o.Chains) {
|
|
return nil, false
|
|
}
|
|
return o.Chains, true
|
|
}
|
|
|
|
// HasChains returns a boolean if a field has been set.
|
|
func (o *Web3ChainList) HasChains() bool {
|
|
if o != nil && !IsNil(o.Chains) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetChains gets a reference to the given []Web3Chain and assigns it to the Chains field.
|
|
func (o *Web3ChainList) SetChains(v []Web3Chain) {
|
|
o.Chains = v
|
|
}
|
|
|
|
func (o Web3ChainList) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o Web3ChainList) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Chains) {
|
|
toSerialize["chains"] = o.Chains
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *Web3ChainList) UnmarshalJSON(data []byte) (err error) {
|
|
varWeb3ChainList := _Web3ChainList{}
|
|
|
|
err = json.Unmarshal(data, &varWeb3ChainList)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = Web3ChainList(varWeb3ChainList)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "chains")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableWeb3ChainList struct {
|
|
value *Web3ChainList
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableWeb3ChainList) Get() *Web3ChainList {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableWeb3ChainList) Set(val *Web3ChainList) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableWeb3ChainList) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableWeb3ChainList) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableWeb3ChainList(val *Web3ChainList) *NullableWeb3ChainList {
|
|
return &NullableWeb3ChainList{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableWeb3ChainList) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableWeb3ChainList) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|