mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
193 lines
4.8 KiB
Go
193 lines
4.8 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 BooksSyncTally type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &BooksSyncTally{}
|
|
|
|
// BooksSyncTally struct for BooksSyncTally
|
|
type BooksSyncTally struct {
|
|
// Live is the number of vouchers newly posted to the live ledger.
|
|
Live *int64 `json:"live,omitempty"`
|
|
// Sandbox is the number newly posted to the sandbox ledger.
|
|
Sandbox *int64 `json:"sandbox,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _BooksSyncTally BooksSyncTally
|
|
|
|
// NewBooksSyncTally instantiates a new BooksSyncTally 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 NewBooksSyncTally() *BooksSyncTally {
|
|
this := BooksSyncTally{}
|
|
return &this
|
|
}
|
|
|
|
// NewBooksSyncTallyWithDefaults instantiates a new BooksSyncTally 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 NewBooksSyncTallyWithDefaults() *BooksSyncTally {
|
|
this := BooksSyncTally{}
|
|
return &this
|
|
}
|
|
|
|
// GetLive returns the Live field value if set, zero value otherwise.
|
|
func (o *BooksSyncTally) GetLive() int64 {
|
|
if o == nil || IsNil(o.Live) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.Live
|
|
}
|
|
|
|
// GetLiveOk returns a tuple with the Live field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *BooksSyncTally) GetLiveOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.Live) {
|
|
return nil, false
|
|
}
|
|
return o.Live, true
|
|
}
|
|
|
|
// HasLive returns a boolean if a field has been set.
|
|
func (o *BooksSyncTally) HasLive() bool {
|
|
if o != nil && !IsNil(o.Live) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetLive gets a reference to the given int64 and assigns it to the Live field.
|
|
func (o *BooksSyncTally) SetLive(v int64) {
|
|
o.Live = &v
|
|
}
|
|
|
|
// GetSandbox returns the Sandbox field value if set, zero value otherwise.
|
|
func (o *BooksSyncTally) GetSandbox() int64 {
|
|
if o == nil || IsNil(o.Sandbox) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.Sandbox
|
|
}
|
|
|
|
// GetSandboxOk returns a tuple with the Sandbox field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *BooksSyncTally) GetSandboxOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.Sandbox) {
|
|
return nil, false
|
|
}
|
|
return o.Sandbox, true
|
|
}
|
|
|
|
// HasSandbox returns a boolean if a field has been set.
|
|
func (o *BooksSyncTally) HasSandbox() bool {
|
|
if o != nil && !IsNil(o.Sandbox) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetSandbox gets a reference to the given int64 and assigns it to the Sandbox field.
|
|
func (o *BooksSyncTally) SetSandbox(v int64) {
|
|
o.Sandbox = &v
|
|
}
|
|
|
|
func (o BooksSyncTally) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o BooksSyncTally) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Live) {
|
|
toSerialize["live"] = o.Live
|
|
}
|
|
if !IsNil(o.Sandbox) {
|
|
toSerialize["sandbox"] = o.Sandbox
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *BooksSyncTally) UnmarshalJSON(data []byte) (err error) {
|
|
varBooksSyncTally := _BooksSyncTally{}
|
|
|
|
err = json.Unmarshal(data, &varBooksSyncTally)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = BooksSyncTally(varBooksSyncTally)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "live")
|
|
delete(additionalProperties, "sandbox")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableBooksSyncTally struct {
|
|
value *BooksSyncTally
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableBooksSyncTally) Get() *BooksSyncTally {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableBooksSyncTally) Set(val *BooksSyncTally) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableBooksSyncTally) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableBooksSyncTally) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableBooksSyncTally(val *BooksSyncTally) *NullableBooksSyncTally {
|
|
return &NullableBooksSyncTally{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableBooksSyncTally) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableBooksSyncTally) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|