Files
sdk/model_wallet_create_wallet_in.go

345 lines
9.7 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 WalletCreateWalletIn type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &WalletCreateWalletIn{}
// WalletCreateWalletIn struct for WalletCreateWalletIn
type WalletCreateWalletIn struct {
// AccountID is the account this wallet belongs to. Required, and it must be an account of the caller's own org — an unknown one is a 404.
AccountId *string `json:"accountId,omitempty"`
// Agent optionally narrows the wallet to one agent within the org. It becomes a segment of the key ref, so it must be a url-safe segment with no slash.
Agent *string `json:"agent,omitempty"`
// Chain is the EVM chain this wallet is for, as \"eip155:<n>\" or a bare decimal chain id. Optional; a Safe defaults to the Hanzo L1 (36963).
Chain *string `json:"chain,omitempty"`
// Custody selects the signing backend: \"kms\" (in-process, always available), \"mpc\" or \"treasury\" (the deployed MPC ring), or \"safe\" (a Safe smart wallet owned by an MPC key). Empty uses the deployment's default. A backend that is not configured fails CLOSED with 503 rather than fabricating a signature.
Custody *string `json:"custody,omitempty"`
// Name is the wallet's display label. Optional.
Name *string `json:"name,omitempty"`
// Tier is the MPC wallet tier: hot, warm, cold, gas, bridge, contract_admin, validator, quarantine or disaster_recovery. Empty defaults to hot.
Tier *string `json:"tier,omitempty"`
AdditionalProperties map[string]interface{}
}
type _WalletCreateWalletIn WalletCreateWalletIn
// NewWalletCreateWalletIn instantiates a new WalletCreateWalletIn 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 NewWalletCreateWalletIn() *WalletCreateWalletIn {
this := WalletCreateWalletIn{}
return &this
}
// NewWalletCreateWalletInWithDefaults instantiates a new WalletCreateWalletIn 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 NewWalletCreateWalletInWithDefaults() *WalletCreateWalletIn {
this := WalletCreateWalletIn{}
return &this
}
// GetAccountId returns the AccountId field value if set, zero value otherwise.
func (o *WalletCreateWalletIn) GetAccountId() string {
if o == nil || IsNil(o.AccountId) {
var ret string
return ret
}
return *o.AccountId
}
// GetAccountIdOk returns a tuple with the AccountId field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *WalletCreateWalletIn) GetAccountIdOk() (*string, bool) {
if o == nil || IsNil(o.AccountId) {
return nil, false
}
return o.AccountId, true
}
// HasAccountId returns a boolean if a field has been set.
func (o *WalletCreateWalletIn) HasAccountId() bool {
if o != nil && !IsNil(o.AccountId) {
return true
}
return false
}
// SetAccountId gets a reference to the given string and assigns it to the AccountId field.
func (o *WalletCreateWalletIn) SetAccountId(v string) {
o.AccountId = &v
}
// GetAgent returns the Agent field value if set, zero value otherwise.
func (o *WalletCreateWalletIn) GetAgent() string {
if o == nil || IsNil(o.Agent) {
var ret string
return ret
}
return *o.Agent
}
// GetAgentOk returns a tuple with the Agent field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *WalletCreateWalletIn) GetAgentOk() (*string, bool) {
if o == nil || IsNil(o.Agent) {
return nil, false
}
return o.Agent, true
}
// HasAgent returns a boolean if a field has been set.
func (o *WalletCreateWalletIn) HasAgent() bool {
if o != nil && !IsNil(o.Agent) {
return true
}
return false
}
// SetAgent gets a reference to the given string and assigns it to the Agent field.
func (o *WalletCreateWalletIn) SetAgent(v string) {
o.Agent = &v
}
// GetChain returns the Chain field value if set, zero value otherwise.
func (o *WalletCreateWalletIn) GetChain() string {
if o == nil || IsNil(o.Chain) {
var ret string
return ret
}
return *o.Chain
}
// GetChainOk returns a tuple with the Chain field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *WalletCreateWalletIn) GetChainOk() (*string, bool) {
if o == nil || IsNil(o.Chain) {
return nil, false
}
return o.Chain, true
}
// HasChain returns a boolean if a field has been set.
func (o *WalletCreateWalletIn) HasChain() bool {
if o != nil && !IsNil(o.Chain) {
return true
}
return false
}
// SetChain gets a reference to the given string and assigns it to the Chain field.
func (o *WalletCreateWalletIn) SetChain(v string) {
o.Chain = &v
}
// GetCustody returns the Custody field value if set, zero value otherwise.
func (o *WalletCreateWalletIn) GetCustody() string {
if o == nil || IsNil(o.Custody) {
var ret string
return ret
}
return *o.Custody
}
// GetCustodyOk returns a tuple with the Custody field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *WalletCreateWalletIn) GetCustodyOk() (*string, bool) {
if o == nil || IsNil(o.Custody) {
return nil, false
}
return o.Custody, true
}
// HasCustody returns a boolean if a field has been set.
func (o *WalletCreateWalletIn) HasCustody() bool {
if o != nil && !IsNil(o.Custody) {
return true
}
return false
}
// SetCustody gets a reference to the given string and assigns it to the Custody field.
func (o *WalletCreateWalletIn) SetCustody(v string) {
o.Custody = &v
}
// GetName returns the Name field value if set, zero value otherwise.
func (o *WalletCreateWalletIn) 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 *WalletCreateWalletIn) 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 *WalletCreateWalletIn) 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 *WalletCreateWalletIn) SetName(v string) {
o.Name = &v
}
// GetTier returns the Tier field value if set, zero value otherwise.
func (o *WalletCreateWalletIn) GetTier() string {
if o == nil || IsNil(o.Tier) {
var ret string
return ret
}
return *o.Tier
}
// GetTierOk returns a tuple with the Tier field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *WalletCreateWalletIn) GetTierOk() (*string, bool) {
if o == nil || IsNil(o.Tier) {
return nil, false
}
return o.Tier, true
}
// HasTier returns a boolean if a field has been set.
func (o *WalletCreateWalletIn) HasTier() bool {
if o != nil && !IsNil(o.Tier) {
return true
}
return false
}
// SetTier gets a reference to the given string and assigns it to the Tier field.
func (o *WalletCreateWalletIn) SetTier(v string) {
o.Tier = &v
}
func (o WalletCreateWalletIn) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o WalletCreateWalletIn) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.AccountId) {
toSerialize["accountId"] = o.AccountId
}
if !IsNil(o.Agent) {
toSerialize["agent"] = o.Agent
}
if !IsNil(o.Chain) {
toSerialize["chain"] = o.Chain
}
if !IsNil(o.Custody) {
toSerialize["custody"] = o.Custody
}
if !IsNil(o.Name) {
toSerialize["name"] = o.Name
}
if !IsNil(o.Tier) {
toSerialize["tier"] = o.Tier
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *WalletCreateWalletIn) UnmarshalJSON(data []byte) (err error) {
varWalletCreateWalletIn := _WalletCreateWalletIn{}
err = json.Unmarshal(data, &varWalletCreateWalletIn)
if err != nil {
return err
}
*o = WalletCreateWalletIn(varWalletCreateWalletIn)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "accountId")
delete(additionalProperties, "agent")
delete(additionalProperties, "chain")
delete(additionalProperties, "custody")
delete(additionalProperties, "name")
delete(additionalProperties, "tier")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableWalletCreateWalletIn struct {
value *WalletCreateWalletIn
isSet bool
}
func (v NullableWalletCreateWalletIn) Get() *WalletCreateWalletIn {
return v.value
}
func (v *NullableWalletCreateWalletIn) Set(val *WalletCreateWalletIn) {
v.value = val
v.isSet = true
}
func (v NullableWalletCreateWalletIn) IsSet() bool {
return v.isSet
}
func (v *NullableWalletCreateWalletIn) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableWalletCreateWalletIn(val *WalletCreateWalletIn) *NullableWalletCreateWalletIn {
return &NullableWalletCreateWalletIn{value: val, isSet: true}
}
func (v NullableWalletCreateWalletIn) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableWalletCreateWalletIn) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}