Files
sdk/model_validator_validator_list.go

193 lines
5.3 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 ValidatorValidatorList type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &ValidatorValidatorList{}
// ValidatorValidatorList struct for ValidatorValidatorList
type ValidatorValidatorList struct {
// Data is one entry per slot this org has claimed.
Data []ValidatorSlotView `json:"data,omitempty"`
// Network is the luxd network slug new nodes join on this deployment.
Network *string `json:"network,omitempty"`
AdditionalProperties map[string]interface{}
}
type _ValidatorValidatorList ValidatorValidatorList
// NewValidatorValidatorList instantiates a new ValidatorValidatorList 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 NewValidatorValidatorList() *ValidatorValidatorList {
this := ValidatorValidatorList{}
return &this
}
// NewValidatorValidatorListWithDefaults instantiates a new ValidatorValidatorList 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 NewValidatorValidatorListWithDefaults() *ValidatorValidatorList {
this := ValidatorValidatorList{}
return &this
}
// GetData returns the Data field value if set, zero value otherwise.
func (o *ValidatorValidatorList) GetData() []ValidatorSlotView {
if o == nil || IsNil(o.Data) {
var ret []ValidatorSlotView
return ret
}
return o.Data
}
// GetDataOk returns a tuple with the Data field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ValidatorValidatorList) GetDataOk() ([]ValidatorSlotView, bool) {
if o == nil || IsNil(o.Data) {
return nil, false
}
return o.Data, true
}
// HasData returns a boolean if a field has been set.
func (o *ValidatorValidatorList) HasData() bool {
if o != nil && !IsNil(o.Data) {
return true
}
return false
}
// SetData gets a reference to the given []ValidatorSlotView and assigns it to the Data field.
func (o *ValidatorValidatorList) SetData(v []ValidatorSlotView) {
o.Data = v
}
// GetNetwork returns the Network field value if set, zero value otherwise.
func (o *ValidatorValidatorList) GetNetwork() string {
if o == nil || IsNil(o.Network) {
var ret string
return ret
}
return *o.Network
}
// GetNetworkOk returns a tuple with the Network field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ValidatorValidatorList) GetNetworkOk() (*string, bool) {
if o == nil || IsNil(o.Network) {
return nil, false
}
return o.Network, true
}
// HasNetwork returns a boolean if a field has been set.
func (o *ValidatorValidatorList) HasNetwork() bool {
if o != nil && !IsNil(o.Network) {
return true
}
return false
}
// SetNetwork gets a reference to the given string and assigns it to the Network field.
func (o *ValidatorValidatorList) SetNetwork(v string) {
o.Network = &v
}
func (o ValidatorValidatorList) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o ValidatorValidatorList) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Data) {
toSerialize["data"] = o.Data
}
if !IsNil(o.Network) {
toSerialize["network"] = o.Network
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *ValidatorValidatorList) UnmarshalJSON(data []byte) (err error) {
varValidatorValidatorList := _ValidatorValidatorList{}
err = json.Unmarshal(data, &varValidatorValidatorList)
if err != nil {
return err
}
*o = ValidatorValidatorList(varValidatorValidatorList)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "data")
delete(additionalProperties, "network")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableValidatorValidatorList struct {
value *ValidatorValidatorList
isSet bool
}
func (v NullableValidatorValidatorList) Get() *ValidatorValidatorList {
return v.value
}
func (v *NullableValidatorValidatorList) Set(val *ValidatorValidatorList) {
v.value = val
v.isSet = true
}
func (v NullableValidatorValidatorList) IsSet() bool {
return v.isSet
}
func (v *NullableValidatorValidatorList) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableValidatorValidatorList(val *ValidatorValidatorList) *NullableValidatorValidatorList {
return &NullableValidatorValidatorList{value: val, isSet: true}
}
func (v NullableValidatorValidatorList) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableValidatorValidatorList) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}