mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
413 lines
11 KiB
Go
413 lines
11 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 BillingGatewayAccept type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &BillingGatewayAccept{}
|
|
|
|
// BillingGatewayAccept struct for BillingGatewayAccept
|
|
type BillingGatewayAccept struct {
|
|
Asset *string `json:"asset,omitempty"`
|
|
Decimals *int64 `json:"decimals,omitempty"`
|
|
Domain *BillingGatewayDomain `json:"domain,omitempty"`
|
|
MaxAmount *string `json:"maxAmount,omitempty"`
|
|
MinAmount *string `json:"minAmount,omitempty"`
|
|
MinValiditySeconds *int64 `json:"minValiditySeconds,omitempty"`
|
|
Network *string `json:"network,omitempty"`
|
|
Symbol *string `json:"symbol,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _BillingGatewayAccept BillingGatewayAccept
|
|
|
|
// NewBillingGatewayAccept instantiates a new BillingGatewayAccept 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 NewBillingGatewayAccept() *BillingGatewayAccept {
|
|
this := BillingGatewayAccept{}
|
|
return &this
|
|
}
|
|
|
|
// NewBillingGatewayAcceptWithDefaults instantiates a new BillingGatewayAccept 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 NewBillingGatewayAcceptWithDefaults() *BillingGatewayAccept {
|
|
this := BillingGatewayAccept{}
|
|
return &this
|
|
}
|
|
|
|
// GetAsset returns the Asset field value if set, zero value otherwise.
|
|
func (o *BillingGatewayAccept) GetAsset() string {
|
|
if o == nil || IsNil(o.Asset) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Asset
|
|
}
|
|
|
|
// GetAssetOk returns a tuple with the Asset field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *BillingGatewayAccept) GetAssetOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Asset) {
|
|
return nil, false
|
|
}
|
|
return o.Asset, true
|
|
}
|
|
|
|
// HasAsset returns a boolean if a field has been set.
|
|
func (o *BillingGatewayAccept) HasAsset() bool {
|
|
if o != nil && !IsNil(o.Asset) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetAsset gets a reference to the given string and assigns it to the Asset field.
|
|
func (o *BillingGatewayAccept) SetAsset(v string) {
|
|
o.Asset = &v
|
|
}
|
|
|
|
// GetDecimals returns the Decimals field value if set, zero value otherwise.
|
|
func (o *BillingGatewayAccept) GetDecimals() int64 {
|
|
if o == nil || IsNil(o.Decimals) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.Decimals
|
|
}
|
|
|
|
// GetDecimalsOk returns a tuple with the Decimals field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *BillingGatewayAccept) GetDecimalsOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.Decimals) {
|
|
return nil, false
|
|
}
|
|
return o.Decimals, true
|
|
}
|
|
|
|
// HasDecimals returns a boolean if a field has been set.
|
|
func (o *BillingGatewayAccept) HasDecimals() bool {
|
|
if o != nil && !IsNil(o.Decimals) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetDecimals gets a reference to the given int64 and assigns it to the Decimals field.
|
|
func (o *BillingGatewayAccept) SetDecimals(v int64) {
|
|
o.Decimals = &v
|
|
}
|
|
|
|
// GetDomain returns the Domain field value if set, zero value otherwise.
|
|
func (o *BillingGatewayAccept) GetDomain() BillingGatewayDomain {
|
|
if o == nil || IsNil(o.Domain) {
|
|
var ret BillingGatewayDomain
|
|
return ret
|
|
}
|
|
return *o.Domain
|
|
}
|
|
|
|
// GetDomainOk returns a tuple with the Domain field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *BillingGatewayAccept) GetDomainOk() (*BillingGatewayDomain, bool) {
|
|
if o == nil || IsNil(o.Domain) {
|
|
return nil, false
|
|
}
|
|
return o.Domain, true
|
|
}
|
|
|
|
// HasDomain returns a boolean if a field has been set.
|
|
func (o *BillingGatewayAccept) HasDomain() bool {
|
|
if o != nil && !IsNil(o.Domain) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetDomain gets a reference to the given BillingGatewayDomain and assigns it to the Domain field.
|
|
func (o *BillingGatewayAccept) SetDomain(v BillingGatewayDomain) {
|
|
o.Domain = &v
|
|
}
|
|
|
|
// GetMaxAmount returns the MaxAmount field value if set, zero value otherwise.
|
|
func (o *BillingGatewayAccept) GetMaxAmount() string {
|
|
if o == nil || IsNil(o.MaxAmount) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.MaxAmount
|
|
}
|
|
|
|
// GetMaxAmountOk returns a tuple with the MaxAmount field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *BillingGatewayAccept) GetMaxAmountOk() (*string, bool) {
|
|
if o == nil || IsNil(o.MaxAmount) {
|
|
return nil, false
|
|
}
|
|
return o.MaxAmount, true
|
|
}
|
|
|
|
// HasMaxAmount returns a boolean if a field has been set.
|
|
func (o *BillingGatewayAccept) HasMaxAmount() bool {
|
|
if o != nil && !IsNil(o.MaxAmount) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetMaxAmount gets a reference to the given string and assigns it to the MaxAmount field.
|
|
func (o *BillingGatewayAccept) SetMaxAmount(v string) {
|
|
o.MaxAmount = &v
|
|
}
|
|
|
|
// GetMinAmount returns the MinAmount field value if set, zero value otherwise.
|
|
func (o *BillingGatewayAccept) GetMinAmount() string {
|
|
if o == nil || IsNil(o.MinAmount) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.MinAmount
|
|
}
|
|
|
|
// GetMinAmountOk returns a tuple with the MinAmount field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *BillingGatewayAccept) GetMinAmountOk() (*string, bool) {
|
|
if o == nil || IsNil(o.MinAmount) {
|
|
return nil, false
|
|
}
|
|
return o.MinAmount, true
|
|
}
|
|
|
|
// HasMinAmount returns a boolean if a field has been set.
|
|
func (o *BillingGatewayAccept) HasMinAmount() bool {
|
|
if o != nil && !IsNil(o.MinAmount) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetMinAmount gets a reference to the given string and assigns it to the MinAmount field.
|
|
func (o *BillingGatewayAccept) SetMinAmount(v string) {
|
|
o.MinAmount = &v
|
|
}
|
|
|
|
// GetMinValiditySeconds returns the MinValiditySeconds field value if set, zero value otherwise.
|
|
func (o *BillingGatewayAccept) GetMinValiditySeconds() int64 {
|
|
if o == nil || IsNil(o.MinValiditySeconds) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.MinValiditySeconds
|
|
}
|
|
|
|
// GetMinValiditySecondsOk returns a tuple with the MinValiditySeconds field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *BillingGatewayAccept) GetMinValiditySecondsOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.MinValiditySeconds) {
|
|
return nil, false
|
|
}
|
|
return o.MinValiditySeconds, true
|
|
}
|
|
|
|
// HasMinValiditySeconds returns a boolean if a field has been set.
|
|
func (o *BillingGatewayAccept) HasMinValiditySeconds() bool {
|
|
if o != nil && !IsNil(o.MinValiditySeconds) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetMinValiditySeconds gets a reference to the given int64 and assigns it to the MinValiditySeconds field.
|
|
func (o *BillingGatewayAccept) SetMinValiditySeconds(v int64) {
|
|
o.MinValiditySeconds = &v
|
|
}
|
|
|
|
// GetNetwork returns the Network field value if set, zero value otherwise.
|
|
func (o *BillingGatewayAccept) 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 *BillingGatewayAccept) 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 *BillingGatewayAccept) 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 *BillingGatewayAccept) SetNetwork(v string) {
|
|
o.Network = &v
|
|
}
|
|
|
|
// GetSymbol returns the Symbol field value if set, zero value otherwise.
|
|
func (o *BillingGatewayAccept) GetSymbol() string {
|
|
if o == nil || IsNil(o.Symbol) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Symbol
|
|
}
|
|
|
|
// GetSymbolOk returns a tuple with the Symbol field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *BillingGatewayAccept) GetSymbolOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Symbol) {
|
|
return nil, false
|
|
}
|
|
return o.Symbol, true
|
|
}
|
|
|
|
// HasSymbol returns a boolean if a field has been set.
|
|
func (o *BillingGatewayAccept) HasSymbol() bool {
|
|
if o != nil && !IsNil(o.Symbol) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetSymbol gets a reference to the given string and assigns it to the Symbol field.
|
|
func (o *BillingGatewayAccept) SetSymbol(v string) {
|
|
o.Symbol = &v
|
|
}
|
|
|
|
func (o BillingGatewayAccept) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o BillingGatewayAccept) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Asset) {
|
|
toSerialize["asset"] = o.Asset
|
|
}
|
|
if !IsNil(o.Decimals) {
|
|
toSerialize["decimals"] = o.Decimals
|
|
}
|
|
if !IsNil(o.Domain) {
|
|
toSerialize["domain"] = o.Domain
|
|
}
|
|
if !IsNil(o.MaxAmount) {
|
|
toSerialize["maxAmount"] = o.MaxAmount
|
|
}
|
|
if !IsNil(o.MinAmount) {
|
|
toSerialize["minAmount"] = o.MinAmount
|
|
}
|
|
if !IsNil(o.MinValiditySeconds) {
|
|
toSerialize["minValiditySeconds"] = o.MinValiditySeconds
|
|
}
|
|
if !IsNil(o.Network) {
|
|
toSerialize["network"] = o.Network
|
|
}
|
|
if !IsNil(o.Symbol) {
|
|
toSerialize["symbol"] = o.Symbol
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *BillingGatewayAccept) UnmarshalJSON(data []byte) (err error) {
|
|
varBillingGatewayAccept := _BillingGatewayAccept{}
|
|
|
|
err = json.Unmarshal(data, &varBillingGatewayAccept)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = BillingGatewayAccept(varBillingGatewayAccept)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "asset")
|
|
delete(additionalProperties, "decimals")
|
|
delete(additionalProperties, "domain")
|
|
delete(additionalProperties, "maxAmount")
|
|
delete(additionalProperties, "minAmount")
|
|
delete(additionalProperties, "minValiditySeconds")
|
|
delete(additionalProperties, "network")
|
|
delete(additionalProperties, "symbol")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableBillingGatewayAccept struct {
|
|
value *BillingGatewayAccept
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableBillingGatewayAccept) Get() *BillingGatewayAccept {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableBillingGatewayAccept) Set(val *BillingGatewayAccept) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableBillingGatewayAccept) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableBillingGatewayAccept) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableBillingGatewayAccept(val *BillingGatewayAccept) *NullableBillingGatewayAccept {
|
|
return &NullableBillingGatewayAccept{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableBillingGatewayAccept) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableBillingGatewayAccept) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|