mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
599 lines
16 KiB
Go
599 lines
16 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 BillingPayout type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &BillingPayout{}
|
|
|
|
// BillingPayout struct for BillingPayout
|
|
type BillingPayout struct {
|
|
Amount *int64 `json:"amount,omitempty"`
|
|
ArrivalDate *string `json:"arrivalDate,omitempty"`
|
|
Created *string `json:"created,omitempty"`
|
|
Currency *string `json:"currency,omitempty"`
|
|
Description *string `json:"description,omitempty"`
|
|
DestinationId *string `json:"destinationId,omitempty"`
|
|
DestinationType *string `json:"destinationType,omitempty"`
|
|
FailureCode *string `json:"failureCode,omitempty"`
|
|
FailureMessage *string `json:"failureMessage,omitempty"`
|
|
Id *string `json:"id,omitempty"`
|
|
Metadata interface{} `json:"metadata,omitempty"`
|
|
ProviderRef *string `json:"providerRef,omitempty"`
|
|
Status *string `json:"status,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _BillingPayout BillingPayout
|
|
|
|
// NewBillingPayout instantiates a new BillingPayout 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 NewBillingPayout() *BillingPayout {
|
|
this := BillingPayout{}
|
|
return &this
|
|
}
|
|
|
|
// NewBillingPayoutWithDefaults instantiates a new BillingPayout 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 NewBillingPayoutWithDefaults() *BillingPayout {
|
|
this := BillingPayout{}
|
|
return &this
|
|
}
|
|
|
|
// GetAmount returns the Amount field value if set, zero value otherwise.
|
|
func (o *BillingPayout) GetAmount() int64 {
|
|
if o == nil || IsNil(o.Amount) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.Amount
|
|
}
|
|
|
|
// GetAmountOk returns a tuple with the Amount field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *BillingPayout) GetAmountOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.Amount) {
|
|
return nil, false
|
|
}
|
|
return o.Amount, true
|
|
}
|
|
|
|
// HasAmount returns a boolean if a field has been set.
|
|
func (o *BillingPayout) HasAmount() bool {
|
|
if o != nil && !IsNil(o.Amount) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetAmount gets a reference to the given int64 and assigns it to the Amount field.
|
|
func (o *BillingPayout) SetAmount(v int64) {
|
|
o.Amount = &v
|
|
}
|
|
|
|
// GetArrivalDate returns the ArrivalDate field value if set, zero value otherwise.
|
|
func (o *BillingPayout) GetArrivalDate() string {
|
|
if o == nil || IsNil(o.ArrivalDate) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.ArrivalDate
|
|
}
|
|
|
|
// GetArrivalDateOk returns a tuple with the ArrivalDate field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *BillingPayout) GetArrivalDateOk() (*string, bool) {
|
|
if o == nil || IsNil(o.ArrivalDate) {
|
|
return nil, false
|
|
}
|
|
return o.ArrivalDate, true
|
|
}
|
|
|
|
// HasArrivalDate returns a boolean if a field has been set.
|
|
func (o *BillingPayout) HasArrivalDate() bool {
|
|
if o != nil && !IsNil(o.ArrivalDate) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetArrivalDate gets a reference to the given string and assigns it to the ArrivalDate field.
|
|
func (o *BillingPayout) SetArrivalDate(v string) {
|
|
o.ArrivalDate = &v
|
|
}
|
|
|
|
// GetCreated returns the Created field value if set, zero value otherwise.
|
|
func (o *BillingPayout) GetCreated() string {
|
|
if o == nil || IsNil(o.Created) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Created
|
|
}
|
|
|
|
// GetCreatedOk returns a tuple with the Created field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *BillingPayout) GetCreatedOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Created) {
|
|
return nil, false
|
|
}
|
|
return o.Created, true
|
|
}
|
|
|
|
// HasCreated returns a boolean if a field has been set.
|
|
func (o *BillingPayout) HasCreated() bool {
|
|
if o != nil && !IsNil(o.Created) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetCreated gets a reference to the given string and assigns it to the Created field.
|
|
func (o *BillingPayout) SetCreated(v string) {
|
|
o.Created = &v
|
|
}
|
|
|
|
// GetCurrency returns the Currency field value if set, zero value otherwise.
|
|
func (o *BillingPayout) GetCurrency() string {
|
|
if o == nil || IsNil(o.Currency) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Currency
|
|
}
|
|
|
|
// GetCurrencyOk returns a tuple with the Currency field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *BillingPayout) GetCurrencyOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Currency) {
|
|
return nil, false
|
|
}
|
|
return o.Currency, true
|
|
}
|
|
|
|
// HasCurrency returns a boolean if a field has been set.
|
|
func (o *BillingPayout) HasCurrency() bool {
|
|
if o != nil && !IsNil(o.Currency) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetCurrency gets a reference to the given string and assigns it to the Currency field.
|
|
func (o *BillingPayout) SetCurrency(v string) {
|
|
o.Currency = &v
|
|
}
|
|
|
|
// GetDescription returns the Description field value if set, zero value otherwise.
|
|
func (o *BillingPayout) GetDescription() string {
|
|
if o == nil || IsNil(o.Description) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Description
|
|
}
|
|
|
|
// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *BillingPayout) GetDescriptionOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Description) {
|
|
return nil, false
|
|
}
|
|
return o.Description, true
|
|
}
|
|
|
|
// HasDescription returns a boolean if a field has been set.
|
|
func (o *BillingPayout) HasDescription() bool {
|
|
if o != nil && !IsNil(o.Description) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetDescription gets a reference to the given string and assigns it to the Description field.
|
|
func (o *BillingPayout) SetDescription(v string) {
|
|
o.Description = &v
|
|
}
|
|
|
|
// GetDestinationId returns the DestinationId field value if set, zero value otherwise.
|
|
func (o *BillingPayout) GetDestinationId() string {
|
|
if o == nil || IsNil(o.DestinationId) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.DestinationId
|
|
}
|
|
|
|
// GetDestinationIdOk returns a tuple with the DestinationId field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *BillingPayout) GetDestinationIdOk() (*string, bool) {
|
|
if o == nil || IsNil(o.DestinationId) {
|
|
return nil, false
|
|
}
|
|
return o.DestinationId, true
|
|
}
|
|
|
|
// HasDestinationId returns a boolean if a field has been set.
|
|
func (o *BillingPayout) HasDestinationId() bool {
|
|
if o != nil && !IsNil(o.DestinationId) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetDestinationId gets a reference to the given string and assigns it to the DestinationId field.
|
|
func (o *BillingPayout) SetDestinationId(v string) {
|
|
o.DestinationId = &v
|
|
}
|
|
|
|
// GetDestinationType returns the DestinationType field value if set, zero value otherwise.
|
|
func (o *BillingPayout) GetDestinationType() string {
|
|
if o == nil || IsNil(o.DestinationType) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.DestinationType
|
|
}
|
|
|
|
// GetDestinationTypeOk returns a tuple with the DestinationType field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *BillingPayout) GetDestinationTypeOk() (*string, bool) {
|
|
if o == nil || IsNil(o.DestinationType) {
|
|
return nil, false
|
|
}
|
|
return o.DestinationType, true
|
|
}
|
|
|
|
// HasDestinationType returns a boolean if a field has been set.
|
|
func (o *BillingPayout) HasDestinationType() bool {
|
|
if o != nil && !IsNil(o.DestinationType) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetDestinationType gets a reference to the given string and assigns it to the DestinationType field.
|
|
func (o *BillingPayout) SetDestinationType(v string) {
|
|
o.DestinationType = &v
|
|
}
|
|
|
|
// GetFailureCode returns the FailureCode field value if set, zero value otherwise.
|
|
func (o *BillingPayout) GetFailureCode() string {
|
|
if o == nil || IsNil(o.FailureCode) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.FailureCode
|
|
}
|
|
|
|
// GetFailureCodeOk returns a tuple with the FailureCode field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *BillingPayout) GetFailureCodeOk() (*string, bool) {
|
|
if o == nil || IsNil(o.FailureCode) {
|
|
return nil, false
|
|
}
|
|
return o.FailureCode, true
|
|
}
|
|
|
|
// HasFailureCode returns a boolean if a field has been set.
|
|
func (o *BillingPayout) HasFailureCode() bool {
|
|
if o != nil && !IsNil(o.FailureCode) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetFailureCode gets a reference to the given string and assigns it to the FailureCode field.
|
|
func (o *BillingPayout) SetFailureCode(v string) {
|
|
o.FailureCode = &v
|
|
}
|
|
|
|
// GetFailureMessage returns the FailureMessage field value if set, zero value otherwise.
|
|
func (o *BillingPayout) GetFailureMessage() string {
|
|
if o == nil || IsNil(o.FailureMessage) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.FailureMessage
|
|
}
|
|
|
|
// GetFailureMessageOk returns a tuple with the FailureMessage field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *BillingPayout) GetFailureMessageOk() (*string, bool) {
|
|
if o == nil || IsNil(o.FailureMessage) {
|
|
return nil, false
|
|
}
|
|
return o.FailureMessage, true
|
|
}
|
|
|
|
// HasFailureMessage returns a boolean if a field has been set.
|
|
func (o *BillingPayout) HasFailureMessage() bool {
|
|
if o != nil && !IsNil(o.FailureMessage) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetFailureMessage gets a reference to the given string and assigns it to the FailureMessage field.
|
|
func (o *BillingPayout) SetFailureMessage(v string) {
|
|
o.FailureMessage = &v
|
|
}
|
|
|
|
// GetId returns the Id field value if set, zero value otherwise.
|
|
func (o *BillingPayout) GetId() string {
|
|
if o == nil || IsNil(o.Id) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Id
|
|
}
|
|
|
|
// GetIdOk returns a tuple with the Id field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *BillingPayout) GetIdOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Id) {
|
|
return nil, false
|
|
}
|
|
return o.Id, true
|
|
}
|
|
|
|
// HasId returns a boolean if a field has been set.
|
|
func (o *BillingPayout) HasId() bool {
|
|
if o != nil && !IsNil(o.Id) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetId gets a reference to the given string and assigns it to the Id field.
|
|
func (o *BillingPayout) SetId(v string) {
|
|
o.Id = &v
|
|
}
|
|
|
|
// GetMetadata returns the Metadata field value if set, zero value otherwise (both if not set or set to explicit null).
|
|
func (o *BillingPayout) GetMetadata() interface{} {
|
|
if o == nil {
|
|
var ret interface{}
|
|
return ret
|
|
}
|
|
return o.Metadata
|
|
}
|
|
|
|
// GetMetadataOk returns a tuple with the Metadata field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
// NOTE: If the value is an explicit nil, `nil, true` will be returned
|
|
func (o *BillingPayout) GetMetadataOk() (*interface{}, bool) {
|
|
if o == nil || IsNil(o.Metadata) {
|
|
return nil, false
|
|
}
|
|
return &o.Metadata, true
|
|
}
|
|
|
|
// HasMetadata returns a boolean if a field has been set.
|
|
func (o *BillingPayout) HasMetadata() bool {
|
|
if o != nil && !IsNil(o.Metadata) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetMetadata gets a reference to the given interface{} and assigns it to the Metadata field.
|
|
func (o *BillingPayout) SetMetadata(v interface{}) {
|
|
o.Metadata = v
|
|
}
|
|
|
|
// GetProviderRef returns the ProviderRef field value if set, zero value otherwise.
|
|
func (o *BillingPayout) GetProviderRef() string {
|
|
if o == nil || IsNil(o.ProviderRef) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.ProviderRef
|
|
}
|
|
|
|
// GetProviderRefOk returns a tuple with the ProviderRef field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *BillingPayout) GetProviderRefOk() (*string, bool) {
|
|
if o == nil || IsNil(o.ProviderRef) {
|
|
return nil, false
|
|
}
|
|
return o.ProviderRef, true
|
|
}
|
|
|
|
// HasProviderRef returns a boolean if a field has been set.
|
|
func (o *BillingPayout) HasProviderRef() bool {
|
|
if o != nil && !IsNil(o.ProviderRef) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetProviderRef gets a reference to the given string and assigns it to the ProviderRef field.
|
|
func (o *BillingPayout) SetProviderRef(v string) {
|
|
o.ProviderRef = &v
|
|
}
|
|
|
|
// GetStatus returns the Status field value if set, zero value otherwise.
|
|
func (o *BillingPayout) GetStatus() string {
|
|
if o == nil || IsNil(o.Status) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Status
|
|
}
|
|
|
|
// GetStatusOk returns a tuple with the Status field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *BillingPayout) GetStatusOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Status) {
|
|
return nil, false
|
|
}
|
|
return o.Status, true
|
|
}
|
|
|
|
// HasStatus returns a boolean if a field has been set.
|
|
func (o *BillingPayout) HasStatus() bool {
|
|
if o != nil && !IsNil(o.Status) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetStatus gets a reference to the given string and assigns it to the Status field.
|
|
func (o *BillingPayout) SetStatus(v string) {
|
|
o.Status = &v
|
|
}
|
|
|
|
func (o BillingPayout) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o BillingPayout) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Amount) {
|
|
toSerialize["amount"] = o.Amount
|
|
}
|
|
if !IsNil(o.ArrivalDate) {
|
|
toSerialize["arrivalDate"] = o.ArrivalDate
|
|
}
|
|
if !IsNil(o.Created) {
|
|
toSerialize["created"] = o.Created
|
|
}
|
|
if !IsNil(o.Currency) {
|
|
toSerialize["currency"] = o.Currency
|
|
}
|
|
if !IsNil(o.Description) {
|
|
toSerialize["description"] = o.Description
|
|
}
|
|
if !IsNil(o.DestinationId) {
|
|
toSerialize["destinationId"] = o.DestinationId
|
|
}
|
|
if !IsNil(o.DestinationType) {
|
|
toSerialize["destinationType"] = o.DestinationType
|
|
}
|
|
if !IsNil(o.FailureCode) {
|
|
toSerialize["failureCode"] = o.FailureCode
|
|
}
|
|
if !IsNil(o.FailureMessage) {
|
|
toSerialize["failureMessage"] = o.FailureMessage
|
|
}
|
|
if !IsNil(o.Id) {
|
|
toSerialize["id"] = o.Id
|
|
}
|
|
if o.Metadata != nil {
|
|
toSerialize["metadata"] = o.Metadata
|
|
}
|
|
if !IsNil(o.ProviderRef) {
|
|
toSerialize["providerRef"] = o.ProviderRef
|
|
}
|
|
if !IsNil(o.Status) {
|
|
toSerialize["status"] = o.Status
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *BillingPayout) UnmarshalJSON(data []byte) (err error) {
|
|
varBillingPayout := _BillingPayout{}
|
|
|
|
err = json.Unmarshal(data, &varBillingPayout)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = BillingPayout(varBillingPayout)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "amount")
|
|
delete(additionalProperties, "arrivalDate")
|
|
delete(additionalProperties, "created")
|
|
delete(additionalProperties, "currency")
|
|
delete(additionalProperties, "description")
|
|
delete(additionalProperties, "destinationId")
|
|
delete(additionalProperties, "destinationType")
|
|
delete(additionalProperties, "failureCode")
|
|
delete(additionalProperties, "failureMessage")
|
|
delete(additionalProperties, "id")
|
|
delete(additionalProperties, "metadata")
|
|
delete(additionalProperties, "providerRef")
|
|
delete(additionalProperties, "status")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableBillingPayout struct {
|
|
value *BillingPayout
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableBillingPayout) Get() *BillingPayout {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableBillingPayout) Set(val *BillingPayout) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableBillingPayout) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableBillingPayout) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableBillingPayout(val *BillingPayout) *NullableBillingPayout {
|
|
return &NullableBillingPayout{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableBillingPayout) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableBillingPayout) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|