mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
376 lines
10 KiB
Go
376 lines
10 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 BillingFinanceLedgerEntry type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &BillingFinanceLedgerEntry{}
|
|
|
|
// BillingFinanceLedgerEntry struct for BillingFinanceLedgerEntry
|
|
type BillingFinanceLedgerEntry struct {
|
|
Account *string `json:"account,omitempty"`
|
|
BalanceCents *int64 `json:"balanceCents,omitempty"`
|
|
Cents *int64 `json:"cents,omitempty"`
|
|
Currency *string `json:"currency,omitempty"`
|
|
Date *string `json:"date,omitempty"`
|
|
Description *string `json:"description,omitempty"`
|
|
Id *string `json:"id,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _BillingFinanceLedgerEntry BillingFinanceLedgerEntry
|
|
|
|
// NewBillingFinanceLedgerEntry instantiates a new BillingFinanceLedgerEntry 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 NewBillingFinanceLedgerEntry() *BillingFinanceLedgerEntry {
|
|
this := BillingFinanceLedgerEntry{}
|
|
return &this
|
|
}
|
|
|
|
// NewBillingFinanceLedgerEntryWithDefaults instantiates a new BillingFinanceLedgerEntry 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 NewBillingFinanceLedgerEntryWithDefaults() *BillingFinanceLedgerEntry {
|
|
this := BillingFinanceLedgerEntry{}
|
|
return &this
|
|
}
|
|
|
|
// GetAccount returns the Account field value if set, zero value otherwise.
|
|
func (o *BillingFinanceLedgerEntry) GetAccount() string {
|
|
if o == nil || IsNil(o.Account) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Account
|
|
}
|
|
|
|
// GetAccountOk returns a tuple with the Account field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *BillingFinanceLedgerEntry) GetAccountOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Account) {
|
|
return nil, false
|
|
}
|
|
return o.Account, true
|
|
}
|
|
|
|
// HasAccount returns a boolean if a field has been set.
|
|
func (o *BillingFinanceLedgerEntry) HasAccount() bool {
|
|
if o != nil && !IsNil(o.Account) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetAccount gets a reference to the given string and assigns it to the Account field.
|
|
func (o *BillingFinanceLedgerEntry) SetAccount(v string) {
|
|
o.Account = &v
|
|
}
|
|
|
|
// GetBalanceCents returns the BalanceCents field value if set, zero value otherwise.
|
|
func (o *BillingFinanceLedgerEntry) GetBalanceCents() int64 {
|
|
if o == nil || IsNil(o.BalanceCents) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.BalanceCents
|
|
}
|
|
|
|
// GetBalanceCentsOk returns a tuple with the BalanceCents field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *BillingFinanceLedgerEntry) GetBalanceCentsOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.BalanceCents) {
|
|
return nil, false
|
|
}
|
|
return o.BalanceCents, true
|
|
}
|
|
|
|
// HasBalanceCents returns a boolean if a field has been set.
|
|
func (o *BillingFinanceLedgerEntry) HasBalanceCents() bool {
|
|
if o != nil && !IsNil(o.BalanceCents) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetBalanceCents gets a reference to the given int64 and assigns it to the BalanceCents field.
|
|
func (o *BillingFinanceLedgerEntry) SetBalanceCents(v int64) {
|
|
o.BalanceCents = &v
|
|
}
|
|
|
|
// GetCents returns the Cents field value if set, zero value otherwise.
|
|
func (o *BillingFinanceLedgerEntry) GetCents() int64 {
|
|
if o == nil || IsNil(o.Cents) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.Cents
|
|
}
|
|
|
|
// GetCentsOk returns a tuple with the Cents field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *BillingFinanceLedgerEntry) GetCentsOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.Cents) {
|
|
return nil, false
|
|
}
|
|
return o.Cents, true
|
|
}
|
|
|
|
// HasCents returns a boolean if a field has been set.
|
|
func (o *BillingFinanceLedgerEntry) HasCents() bool {
|
|
if o != nil && !IsNil(o.Cents) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetCents gets a reference to the given int64 and assigns it to the Cents field.
|
|
func (o *BillingFinanceLedgerEntry) SetCents(v int64) {
|
|
o.Cents = &v
|
|
}
|
|
|
|
// GetCurrency returns the Currency field value if set, zero value otherwise.
|
|
func (o *BillingFinanceLedgerEntry) 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 *BillingFinanceLedgerEntry) 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 *BillingFinanceLedgerEntry) 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 *BillingFinanceLedgerEntry) SetCurrency(v string) {
|
|
o.Currency = &v
|
|
}
|
|
|
|
// GetDate returns the Date field value if set, zero value otherwise.
|
|
func (o *BillingFinanceLedgerEntry) GetDate() string {
|
|
if o == nil || IsNil(o.Date) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Date
|
|
}
|
|
|
|
// GetDateOk returns a tuple with the Date field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *BillingFinanceLedgerEntry) GetDateOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Date) {
|
|
return nil, false
|
|
}
|
|
return o.Date, true
|
|
}
|
|
|
|
// HasDate returns a boolean if a field has been set.
|
|
func (o *BillingFinanceLedgerEntry) HasDate() bool {
|
|
if o != nil && !IsNil(o.Date) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetDate gets a reference to the given string and assigns it to the Date field.
|
|
func (o *BillingFinanceLedgerEntry) SetDate(v string) {
|
|
o.Date = &v
|
|
}
|
|
|
|
// GetDescription returns the Description field value if set, zero value otherwise.
|
|
func (o *BillingFinanceLedgerEntry) 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 *BillingFinanceLedgerEntry) 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 *BillingFinanceLedgerEntry) 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 *BillingFinanceLedgerEntry) SetDescription(v string) {
|
|
o.Description = &v
|
|
}
|
|
|
|
// GetId returns the Id field value if set, zero value otherwise.
|
|
func (o *BillingFinanceLedgerEntry) 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 *BillingFinanceLedgerEntry) 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 *BillingFinanceLedgerEntry) 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 *BillingFinanceLedgerEntry) SetId(v string) {
|
|
o.Id = &v
|
|
}
|
|
|
|
func (o BillingFinanceLedgerEntry) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o BillingFinanceLedgerEntry) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Account) {
|
|
toSerialize["account"] = o.Account
|
|
}
|
|
if !IsNil(o.BalanceCents) {
|
|
toSerialize["balanceCents"] = o.BalanceCents
|
|
}
|
|
if !IsNil(o.Cents) {
|
|
toSerialize["cents"] = o.Cents
|
|
}
|
|
if !IsNil(o.Currency) {
|
|
toSerialize["currency"] = o.Currency
|
|
}
|
|
if !IsNil(o.Date) {
|
|
toSerialize["date"] = o.Date
|
|
}
|
|
if !IsNil(o.Description) {
|
|
toSerialize["description"] = o.Description
|
|
}
|
|
if !IsNil(o.Id) {
|
|
toSerialize["id"] = o.Id
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *BillingFinanceLedgerEntry) UnmarshalJSON(data []byte) (err error) {
|
|
varBillingFinanceLedgerEntry := _BillingFinanceLedgerEntry{}
|
|
|
|
err = json.Unmarshal(data, &varBillingFinanceLedgerEntry)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = BillingFinanceLedgerEntry(varBillingFinanceLedgerEntry)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "account")
|
|
delete(additionalProperties, "balanceCents")
|
|
delete(additionalProperties, "cents")
|
|
delete(additionalProperties, "currency")
|
|
delete(additionalProperties, "date")
|
|
delete(additionalProperties, "description")
|
|
delete(additionalProperties, "id")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableBillingFinanceLedgerEntry struct {
|
|
value *BillingFinanceLedgerEntry
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableBillingFinanceLedgerEntry) Get() *BillingFinanceLedgerEntry {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableBillingFinanceLedgerEntry) Set(val *BillingFinanceLedgerEntry) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableBillingFinanceLedgerEntry) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableBillingFinanceLedgerEntry) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableBillingFinanceLedgerEntry(val *BillingFinanceLedgerEntry) *NullableBillingFinanceLedgerEntry {
|
|
return &NullableBillingFinanceLedgerEntry{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableBillingFinanceLedgerEntry) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableBillingFinanceLedgerEntry) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|