mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
573 lines
15 KiB
Go
573 lines
15 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 TaxStatement type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &TaxStatement{}
|
|
|
|
// TaxStatement struct for TaxStatement
|
|
type TaxStatement struct {
|
|
// Account is the account number the form prints.
|
|
Account *string `json:"account,omitempty"`
|
|
// Backup is the backup withholding the payer applied.
|
|
Backup *TaxWithholding `json:"backup,omitempty"`
|
|
// Boxes are the figures.
|
|
Boxes []TaxAmount `json:"boxes,omitempty"`
|
|
// Corrected is true for a statement that corrects an earlier one.
|
|
Corrected *bool `json:"corrected,omitempty"`
|
|
// FurnishedAt is when it was delivered, unix seconds.
|
|
FurnishedAt *int64 `json:"furnishedAt,omitempty"`
|
|
// ID is the form id the payer issued it under.
|
|
Id *string `json:"id,omitempty"`
|
|
// Kind is 1099-NEC or 1099-MISC.
|
|
Kind *string `json:"kind,omitempty"`
|
|
// Payer is the org that furnished it.
|
|
Payer *TaxParty `json:"payer,omitempty"`
|
|
// Recipient is this org, as the form names it, TIN truncated.
|
|
Recipient *TaxParty `json:"recipient,omitempty"`
|
|
// SupersededBy is the later statement that corrects this one.
|
|
SupersededBy *string `json:"supersededBy,omitempty"`
|
|
// Supersedes is the earlier statement this corrects.
|
|
Supersedes *string `json:"supersedes,omitempty"`
|
|
// Year is the calendar year of the payments.
|
|
Year *int64 `json:"year,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _TaxStatement TaxStatement
|
|
|
|
// NewTaxStatement instantiates a new TaxStatement 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 NewTaxStatement() *TaxStatement {
|
|
this := TaxStatement{}
|
|
return &this
|
|
}
|
|
|
|
// NewTaxStatementWithDefaults instantiates a new TaxStatement 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 NewTaxStatementWithDefaults() *TaxStatement {
|
|
this := TaxStatement{}
|
|
return &this
|
|
}
|
|
|
|
// GetAccount returns the Account field value if set, zero value otherwise.
|
|
func (o *TaxStatement) 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 *TaxStatement) 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 *TaxStatement) 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 *TaxStatement) SetAccount(v string) {
|
|
o.Account = &v
|
|
}
|
|
|
|
// GetBackup returns the Backup field value if set, zero value otherwise.
|
|
func (o *TaxStatement) GetBackup() TaxWithholding {
|
|
if o == nil || IsNil(o.Backup) {
|
|
var ret TaxWithholding
|
|
return ret
|
|
}
|
|
return *o.Backup
|
|
}
|
|
|
|
// GetBackupOk returns a tuple with the Backup field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *TaxStatement) GetBackupOk() (*TaxWithholding, bool) {
|
|
if o == nil || IsNil(o.Backup) {
|
|
return nil, false
|
|
}
|
|
return o.Backup, true
|
|
}
|
|
|
|
// HasBackup returns a boolean if a field has been set.
|
|
func (o *TaxStatement) HasBackup() bool {
|
|
if o != nil && !IsNil(o.Backup) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetBackup gets a reference to the given TaxWithholding and assigns it to the Backup field.
|
|
func (o *TaxStatement) SetBackup(v TaxWithholding) {
|
|
o.Backup = &v
|
|
}
|
|
|
|
// GetBoxes returns the Boxes field value if set, zero value otherwise.
|
|
func (o *TaxStatement) GetBoxes() []TaxAmount {
|
|
if o == nil || IsNil(o.Boxes) {
|
|
var ret []TaxAmount
|
|
return ret
|
|
}
|
|
return o.Boxes
|
|
}
|
|
|
|
// GetBoxesOk returns a tuple with the Boxes field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *TaxStatement) GetBoxesOk() ([]TaxAmount, bool) {
|
|
if o == nil || IsNil(o.Boxes) {
|
|
return nil, false
|
|
}
|
|
return o.Boxes, true
|
|
}
|
|
|
|
// HasBoxes returns a boolean if a field has been set.
|
|
func (o *TaxStatement) HasBoxes() bool {
|
|
if o != nil && !IsNil(o.Boxes) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetBoxes gets a reference to the given []TaxAmount and assigns it to the Boxes field.
|
|
func (o *TaxStatement) SetBoxes(v []TaxAmount) {
|
|
o.Boxes = v
|
|
}
|
|
|
|
// GetCorrected returns the Corrected field value if set, zero value otherwise.
|
|
func (o *TaxStatement) GetCorrected() bool {
|
|
if o == nil || IsNil(o.Corrected) {
|
|
var ret bool
|
|
return ret
|
|
}
|
|
return *o.Corrected
|
|
}
|
|
|
|
// GetCorrectedOk returns a tuple with the Corrected field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *TaxStatement) GetCorrectedOk() (*bool, bool) {
|
|
if o == nil || IsNil(o.Corrected) {
|
|
return nil, false
|
|
}
|
|
return o.Corrected, true
|
|
}
|
|
|
|
// HasCorrected returns a boolean if a field has been set.
|
|
func (o *TaxStatement) HasCorrected() bool {
|
|
if o != nil && !IsNil(o.Corrected) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetCorrected gets a reference to the given bool and assigns it to the Corrected field.
|
|
func (o *TaxStatement) SetCorrected(v bool) {
|
|
o.Corrected = &v
|
|
}
|
|
|
|
// GetFurnishedAt returns the FurnishedAt field value if set, zero value otherwise.
|
|
func (o *TaxStatement) GetFurnishedAt() int64 {
|
|
if o == nil || IsNil(o.FurnishedAt) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.FurnishedAt
|
|
}
|
|
|
|
// GetFurnishedAtOk returns a tuple with the FurnishedAt field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *TaxStatement) GetFurnishedAtOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.FurnishedAt) {
|
|
return nil, false
|
|
}
|
|
return o.FurnishedAt, true
|
|
}
|
|
|
|
// HasFurnishedAt returns a boolean if a field has been set.
|
|
func (o *TaxStatement) HasFurnishedAt() bool {
|
|
if o != nil && !IsNil(o.FurnishedAt) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetFurnishedAt gets a reference to the given int64 and assigns it to the FurnishedAt field.
|
|
func (o *TaxStatement) SetFurnishedAt(v int64) {
|
|
o.FurnishedAt = &v
|
|
}
|
|
|
|
// GetId returns the Id field value if set, zero value otherwise.
|
|
func (o *TaxStatement) 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 *TaxStatement) 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 *TaxStatement) 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 *TaxStatement) SetId(v string) {
|
|
o.Id = &v
|
|
}
|
|
|
|
// GetKind returns the Kind field value if set, zero value otherwise.
|
|
func (o *TaxStatement) GetKind() string {
|
|
if o == nil || IsNil(o.Kind) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Kind
|
|
}
|
|
|
|
// GetKindOk returns a tuple with the Kind field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *TaxStatement) GetKindOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Kind) {
|
|
return nil, false
|
|
}
|
|
return o.Kind, true
|
|
}
|
|
|
|
// HasKind returns a boolean if a field has been set.
|
|
func (o *TaxStatement) HasKind() bool {
|
|
if o != nil && !IsNil(o.Kind) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetKind gets a reference to the given string and assigns it to the Kind field.
|
|
func (o *TaxStatement) SetKind(v string) {
|
|
o.Kind = &v
|
|
}
|
|
|
|
// GetPayer returns the Payer field value if set, zero value otherwise.
|
|
func (o *TaxStatement) GetPayer() TaxParty {
|
|
if o == nil || IsNil(o.Payer) {
|
|
var ret TaxParty
|
|
return ret
|
|
}
|
|
return *o.Payer
|
|
}
|
|
|
|
// GetPayerOk returns a tuple with the Payer field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *TaxStatement) GetPayerOk() (*TaxParty, bool) {
|
|
if o == nil || IsNil(o.Payer) {
|
|
return nil, false
|
|
}
|
|
return o.Payer, true
|
|
}
|
|
|
|
// HasPayer returns a boolean if a field has been set.
|
|
func (o *TaxStatement) HasPayer() bool {
|
|
if o != nil && !IsNil(o.Payer) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetPayer gets a reference to the given TaxParty and assigns it to the Payer field.
|
|
func (o *TaxStatement) SetPayer(v TaxParty) {
|
|
o.Payer = &v
|
|
}
|
|
|
|
// GetRecipient returns the Recipient field value if set, zero value otherwise.
|
|
func (o *TaxStatement) GetRecipient() TaxParty {
|
|
if o == nil || IsNil(o.Recipient) {
|
|
var ret TaxParty
|
|
return ret
|
|
}
|
|
return *o.Recipient
|
|
}
|
|
|
|
// GetRecipientOk returns a tuple with the Recipient field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *TaxStatement) GetRecipientOk() (*TaxParty, bool) {
|
|
if o == nil || IsNil(o.Recipient) {
|
|
return nil, false
|
|
}
|
|
return o.Recipient, true
|
|
}
|
|
|
|
// HasRecipient returns a boolean if a field has been set.
|
|
func (o *TaxStatement) HasRecipient() bool {
|
|
if o != nil && !IsNil(o.Recipient) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetRecipient gets a reference to the given TaxParty and assigns it to the Recipient field.
|
|
func (o *TaxStatement) SetRecipient(v TaxParty) {
|
|
o.Recipient = &v
|
|
}
|
|
|
|
// GetSupersededBy returns the SupersededBy field value if set, zero value otherwise.
|
|
func (o *TaxStatement) GetSupersededBy() string {
|
|
if o == nil || IsNil(o.SupersededBy) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.SupersededBy
|
|
}
|
|
|
|
// GetSupersededByOk returns a tuple with the SupersededBy field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *TaxStatement) GetSupersededByOk() (*string, bool) {
|
|
if o == nil || IsNil(o.SupersededBy) {
|
|
return nil, false
|
|
}
|
|
return o.SupersededBy, true
|
|
}
|
|
|
|
// HasSupersededBy returns a boolean if a field has been set.
|
|
func (o *TaxStatement) HasSupersededBy() bool {
|
|
if o != nil && !IsNil(o.SupersededBy) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetSupersededBy gets a reference to the given string and assigns it to the SupersededBy field.
|
|
func (o *TaxStatement) SetSupersededBy(v string) {
|
|
o.SupersededBy = &v
|
|
}
|
|
|
|
// GetSupersedes returns the Supersedes field value if set, zero value otherwise.
|
|
func (o *TaxStatement) GetSupersedes() string {
|
|
if o == nil || IsNil(o.Supersedes) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Supersedes
|
|
}
|
|
|
|
// GetSupersedesOk returns a tuple with the Supersedes field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *TaxStatement) GetSupersedesOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Supersedes) {
|
|
return nil, false
|
|
}
|
|
return o.Supersedes, true
|
|
}
|
|
|
|
// HasSupersedes returns a boolean if a field has been set.
|
|
func (o *TaxStatement) HasSupersedes() bool {
|
|
if o != nil && !IsNil(o.Supersedes) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetSupersedes gets a reference to the given string and assigns it to the Supersedes field.
|
|
func (o *TaxStatement) SetSupersedes(v string) {
|
|
o.Supersedes = &v
|
|
}
|
|
|
|
// GetYear returns the Year field value if set, zero value otherwise.
|
|
func (o *TaxStatement) GetYear() int64 {
|
|
if o == nil || IsNil(o.Year) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.Year
|
|
}
|
|
|
|
// GetYearOk returns a tuple with the Year field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *TaxStatement) GetYearOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.Year) {
|
|
return nil, false
|
|
}
|
|
return o.Year, true
|
|
}
|
|
|
|
// HasYear returns a boolean if a field has been set.
|
|
func (o *TaxStatement) HasYear() bool {
|
|
if o != nil && !IsNil(o.Year) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetYear gets a reference to the given int64 and assigns it to the Year field.
|
|
func (o *TaxStatement) SetYear(v int64) {
|
|
o.Year = &v
|
|
}
|
|
|
|
func (o TaxStatement) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o TaxStatement) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Account) {
|
|
toSerialize["account"] = o.Account
|
|
}
|
|
if !IsNil(o.Backup) {
|
|
toSerialize["backup"] = o.Backup
|
|
}
|
|
if !IsNil(o.Boxes) {
|
|
toSerialize["boxes"] = o.Boxes
|
|
}
|
|
if !IsNil(o.Corrected) {
|
|
toSerialize["corrected"] = o.Corrected
|
|
}
|
|
if !IsNil(o.FurnishedAt) {
|
|
toSerialize["furnishedAt"] = o.FurnishedAt
|
|
}
|
|
if !IsNil(o.Id) {
|
|
toSerialize["id"] = o.Id
|
|
}
|
|
if !IsNil(o.Kind) {
|
|
toSerialize["kind"] = o.Kind
|
|
}
|
|
if !IsNil(o.Payer) {
|
|
toSerialize["payer"] = o.Payer
|
|
}
|
|
if !IsNil(o.Recipient) {
|
|
toSerialize["recipient"] = o.Recipient
|
|
}
|
|
if !IsNil(o.SupersededBy) {
|
|
toSerialize["supersededBy"] = o.SupersededBy
|
|
}
|
|
if !IsNil(o.Supersedes) {
|
|
toSerialize["supersedes"] = o.Supersedes
|
|
}
|
|
if !IsNil(o.Year) {
|
|
toSerialize["year"] = o.Year
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *TaxStatement) UnmarshalJSON(data []byte) (err error) {
|
|
varTaxStatement := _TaxStatement{}
|
|
|
|
err = json.Unmarshal(data, &varTaxStatement)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = TaxStatement(varTaxStatement)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "account")
|
|
delete(additionalProperties, "backup")
|
|
delete(additionalProperties, "boxes")
|
|
delete(additionalProperties, "corrected")
|
|
delete(additionalProperties, "furnishedAt")
|
|
delete(additionalProperties, "id")
|
|
delete(additionalProperties, "kind")
|
|
delete(additionalProperties, "payer")
|
|
delete(additionalProperties, "recipient")
|
|
delete(additionalProperties, "supersededBy")
|
|
delete(additionalProperties, "supersedes")
|
|
delete(additionalProperties, "year")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableTaxStatement struct {
|
|
value *TaxStatement
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableTaxStatement) Get() *TaxStatement {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableTaxStatement) Set(val *TaxStatement) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableTaxStatement) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableTaxStatement) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableTaxStatement(val *TaxStatement) *NullableTaxStatement {
|
|
return &NullableTaxStatement{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableTaxStatement) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableTaxStatement) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|