mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
231 lines
6.4 KiB
Go
231 lines
6.4 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 ValidatorValidatorClaim type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &ValidatorValidatorClaim{}
|
|
|
|
// ValidatorValidatorClaim struct for ValidatorValidatorClaim
|
|
type ValidatorValidatorClaim struct {
|
|
// Nonce is the value GET /v1/validator/challenge issued for this slot.
|
|
Nonce *string `json:"nonce,omitempty"`
|
|
// Signature is the wallet's personal_sign over the challenge message, hex with a 0x prefix.
|
|
Signature *string `json:"signature,omitempty"`
|
|
// TokenID is the Validator-tier GenesisNFT token id being claimed. It IS the validator slot.
|
|
TokenId *int32 `json:"tokenId,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _ValidatorValidatorClaim ValidatorValidatorClaim
|
|
|
|
// NewValidatorValidatorClaim instantiates a new ValidatorValidatorClaim 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 NewValidatorValidatorClaim() *ValidatorValidatorClaim {
|
|
this := ValidatorValidatorClaim{}
|
|
return &this
|
|
}
|
|
|
|
// NewValidatorValidatorClaimWithDefaults instantiates a new ValidatorValidatorClaim 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 NewValidatorValidatorClaimWithDefaults() *ValidatorValidatorClaim {
|
|
this := ValidatorValidatorClaim{}
|
|
return &this
|
|
}
|
|
|
|
// GetNonce returns the Nonce field value if set, zero value otherwise.
|
|
func (o *ValidatorValidatorClaim) GetNonce() string {
|
|
if o == nil || IsNil(o.Nonce) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Nonce
|
|
}
|
|
|
|
// GetNonceOk returns a tuple with the Nonce field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ValidatorValidatorClaim) GetNonceOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Nonce) {
|
|
return nil, false
|
|
}
|
|
return o.Nonce, true
|
|
}
|
|
|
|
// HasNonce returns a boolean if a field has been set.
|
|
func (o *ValidatorValidatorClaim) HasNonce() bool {
|
|
if o != nil && !IsNil(o.Nonce) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetNonce gets a reference to the given string and assigns it to the Nonce field.
|
|
func (o *ValidatorValidatorClaim) SetNonce(v string) {
|
|
o.Nonce = &v
|
|
}
|
|
|
|
// GetSignature returns the Signature field value if set, zero value otherwise.
|
|
func (o *ValidatorValidatorClaim) GetSignature() string {
|
|
if o == nil || IsNil(o.Signature) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Signature
|
|
}
|
|
|
|
// GetSignatureOk returns a tuple with the Signature field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ValidatorValidatorClaim) GetSignatureOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Signature) {
|
|
return nil, false
|
|
}
|
|
return o.Signature, true
|
|
}
|
|
|
|
// HasSignature returns a boolean if a field has been set.
|
|
func (o *ValidatorValidatorClaim) HasSignature() bool {
|
|
if o != nil && !IsNil(o.Signature) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetSignature gets a reference to the given string and assigns it to the Signature field.
|
|
func (o *ValidatorValidatorClaim) SetSignature(v string) {
|
|
o.Signature = &v
|
|
}
|
|
|
|
// GetTokenId returns the TokenId field value if set, zero value otherwise.
|
|
func (o *ValidatorValidatorClaim) GetTokenId() int32 {
|
|
if o == nil || IsNil(o.TokenId) {
|
|
var ret int32
|
|
return ret
|
|
}
|
|
return *o.TokenId
|
|
}
|
|
|
|
// GetTokenIdOk returns a tuple with the TokenId field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ValidatorValidatorClaim) GetTokenIdOk() (*int32, bool) {
|
|
if o == nil || IsNil(o.TokenId) {
|
|
return nil, false
|
|
}
|
|
return o.TokenId, true
|
|
}
|
|
|
|
// HasTokenId returns a boolean if a field has been set.
|
|
func (o *ValidatorValidatorClaim) HasTokenId() bool {
|
|
if o != nil && !IsNil(o.TokenId) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetTokenId gets a reference to the given int32 and assigns it to the TokenId field.
|
|
func (o *ValidatorValidatorClaim) SetTokenId(v int32) {
|
|
o.TokenId = &v
|
|
}
|
|
|
|
func (o ValidatorValidatorClaim) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o ValidatorValidatorClaim) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Nonce) {
|
|
toSerialize["nonce"] = o.Nonce
|
|
}
|
|
if !IsNil(o.Signature) {
|
|
toSerialize["signature"] = o.Signature
|
|
}
|
|
if !IsNil(o.TokenId) {
|
|
toSerialize["tokenId"] = o.TokenId
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *ValidatorValidatorClaim) UnmarshalJSON(data []byte) (err error) {
|
|
varValidatorValidatorClaim := _ValidatorValidatorClaim{}
|
|
|
|
err = json.Unmarshal(data, &varValidatorValidatorClaim)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = ValidatorValidatorClaim(varValidatorValidatorClaim)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "nonce")
|
|
delete(additionalProperties, "signature")
|
|
delete(additionalProperties, "tokenId")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableValidatorValidatorClaim struct {
|
|
value *ValidatorValidatorClaim
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableValidatorValidatorClaim) Get() *ValidatorValidatorClaim {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableValidatorValidatorClaim) Set(val *ValidatorValidatorClaim) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableValidatorValidatorClaim) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableValidatorValidatorClaim) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableValidatorValidatorClaim(val *ValidatorValidatorClaim) *NullableValidatorValidatorClaim {
|
|
return &NullableValidatorValidatorClaim{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableValidatorValidatorClaim) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableValidatorValidatorClaim) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|