mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
307 lines
8.1 KiB
Go
307 lines
8.1 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 WalletSafeProposal type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &WalletSafeProposal{}
|
|
|
|
// WalletSafeProposal struct for WalletSafeProposal
|
|
type WalletSafeProposal struct {
|
|
// R is the r component of the MPC threshold signature over the Safe-tx hash.
|
|
R *string `json:"r,omitempty"`
|
|
// S is the s component of that signature.
|
|
S *string `json:"s,omitempty"`
|
|
// SafeAddress is the Safe contract this transaction is for.
|
|
SafeAddress *string `json:"safeAddress,omitempty"`
|
|
// SafeTxHash is the EIP-712 Safe transaction hash, bound to the Safe contract and the chain id — the value the owner approval signs.
|
|
SafeTxHash *string `json:"safeTxHash,omitempty"`
|
|
// WalletID is the wallet whose Safe this is.
|
|
WalletId *string `json:"walletId,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _WalletSafeProposal WalletSafeProposal
|
|
|
|
// NewWalletSafeProposal instantiates a new WalletSafeProposal 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 NewWalletSafeProposal() *WalletSafeProposal {
|
|
this := WalletSafeProposal{}
|
|
return &this
|
|
}
|
|
|
|
// NewWalletSafeProposalWithDefaults instantiates a new WalletSafeProposal 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 NewWalletSafeProposalWithDefaults() *WalletSafeProposal {
|
|
this := WalletSafeProposal{}
|
|
return &this
|
|
}
|
|
|
|
// GetR returns the R field value if set, zero value otherwise.
|
|
func (o *WalletSafeProposal) GetR() string {
|
|
if o == nil || IsNil(o.R) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.R
|
|
}
|
|
|
|
// GetROk returns a tuple with the R field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *WalletSafeProposal) GetROk() (*string, bool) {
|
|
if o == nil || IsNil(o.R) {
|
|
return nil, false
|
|
}
|
|
return o.R, true
|
|
}
|
|
|
|
// HasR returns a boolean if a field has been set.
|
|
func (o *WalletSafeProposal) HasR() bool {
|
|
if o != nil && !IsNil(o.R) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetR gets a reference to the given string and assigns it to the R field.
|
|
func (o *WalletSafeProposal) SetR(v string) {
|
|
o.R = &v
|
|
}
|
|
|
|
// GetS returns the S field value if set, zero value otherwise.
|
|
func (o *WalletSafeProposal) GetS() string {
|
|
if o == nil || IsNil(o.S) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.S
|
|
}
|
|
|
|
// GetSOk returns a tuple with the S field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *WalletSafeProposal) GetSOk() (*string, bool) {
|
|
if o == nil || IsNil(o.S) {
|
|
return nil, false
|
|
}
|
|
return o.S, true
|
|
}
|
|
|
|
// HasS returns a boolean if a field has been set.
|
|
func (o *WalletSafeProposal) HasS() bool {
|
|
if o != nil && !IsNil(o.S) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetS gets a reference to the given string and assigns it to the S field.
|
|
func (o *WalletSafeProposal) SetS(v string) {
|
|
o.S = &v
|
|
}
|
|
|
|
// GetSafeAddress returns the SafeAddress field value if set, zero value otherwise.
|
|
func (o *WalletSafeProposal) GetSafeAddress() string {
|
|
if o == nil || IsNil(o.SafeAddress) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.SafeAddress
|
|
}
|
|
|
|
// GetSafeAddressOk returns a tuple with the SafeAddress field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *WalletSafeProposal) GetSafeAddressOk() (*string, bool) {
|
|
if o == nil || IsNil(o.SafeAddress) {
|
|
return nil, false
|
|
}
|
|
return o.SafeAddress, true
|
|
}
|
|
|
|
// HasSafeAddress returns a boolean if a field has been set.
|
|
func (o *WalletSafeProposal) HasSafeAddress() bool {
|
|
if o != nil && !IsNil(o.SafeAddress) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetSafeAddress gets a reference to the given string and assigns it to the SafeAddress field.
|
|
func (o *WalletSafeProposal) SetSafeAddress(v string) {
|
|
o.SafeAddress = &v
|
|
}
|
|
|
|
// GetSafeTxHash returns the SafeTxHash field value if set, zero value otherwise.
|
|
func (o *WalletSafeProposal) GetSafeTxHash() string {
|
|
if o == nil || IsNil(o.SafeTxHash) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.SafeTxHash
|
|
}
|
|
|
|
// GetSafeTxHashOk returns a tuple with the SafeTxHash field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *WalletSafeProposal) GetSafeTxHashOk() (*string, bool) {
|
|
if o == nil || IsNil(o.SafeTxHash) {
|
|
return nil, false
|
|
}
|
|
return o.SafeTxHash, true
|
|
}
|
|
|
|
// HasSafeTxHash returns a boolean if a field has been set.
|
|
func (o *WalletSafeProposal) HasSafeTxHash() bool {
|
|
if o != nil && !IsNil(o.SafeTxHash) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetSafeTxHash gets a reference to the given string and assigns it to the SafeTxHash field.
|
|
func (o *WalletSafeProposal) SetSafeTxHash(v string) {
|
|
o.SafeTxHash = &v
|
|
}
|
|
|
|
// GetWalletId returns the WalletId field value if set, zero value otherwise.
|
|
func (o *WalletSafeProposal) GetWalletId() string {
|
|
if o == nil || IsNil(o.WalletId) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.WalletId
|
|
}
|
|
|
|
// GetWalletIdOk returns a tuple with the WalletId field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *WalletSafeProposal) GetWalletIdOk() (*string, bool) {
|
|
if o == nil || IsNil(o.WalletId) {
|
|
return nil, false
|
|
}
|
|
return o.WalletId, true
|
|
}
|
|
|
|
// HasWalletId returns a boolean if a field has been set.
|
|
func (o *WalletSafeProposal) HasWalletId() bool {
|
|
if o != nil && !IsNil(o.WalletId) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetWalletId gets a reference to the given string and assigns it to the WalletId field.
|
|
func (o *WalletSafeProposal) SetWalletId(v string) {
|
|
o.WalletId = &v
|
|
}
|
|
|
|
func (o WalletSafeProposal) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o WalletSafeProposal) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.R) {
|
|
toSerialize["r"] = o.R
|
|
}
|
|
if !IsNil(o.S) {
|
|
toSerialize["s"] = o.S
|
|
}
|
|
if !IsNil(o.SafeAddress) {
|
|
toSerialize["safeAddress"] = o.SafeAddress
|
|
}
|
|
if !IsNil(o.SafeTxHash) {
|
|
toSerialize["safeTxHash"] = o.SafeTxHash
|
|
}
|
|
if !IsNil(o.WalletId) {
|
|
toSerialize["walletId"] = o.WalletId
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *WalletSafeProposal) UnmarshalJSON(data []byte) (err error) {
|
|
varWalletSafeProposal := _WalletSafeProposal{}
|
|
|
|
err = json.Unmarshal(data, &varWalletSafeProposal)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = WalletSafeProposal(varWalletSafeProposal)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "r")
|
|
delete(additionalProperties, "s")
|
|
delete(additionalProperties, "safeAddress")
|
|
delete(additionalProperties, "safeTxHash")
|
|
delete(additionalProperties, "walletId")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableWalletSafeProposal struct {
|
|
value *WalletSafeProposal
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableWalletSafeProposal) Get() *WalletSafeProposal {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableWalletSafeProposal) Set(val *WalletSafeProposal) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableWalletSafeProposal) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableWalletSafeProposal) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableWalletSafeProposal(val *WalletSafeProposal) *NullableWalletSafeProposal {
|
|
return &NullableWalletSafeProposal{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableWalletSafeProposal) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableWalletSafeProposal) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|