Files
sdk/model_tax_filing.go

649 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 TaxFiling type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &TaxFiling{}
// TaxFiling struct for TaxFiling
type TaxFiling struct {
// CreatedAt is when it was exported, unix seconds.
CreatedAt *int64 `json:"createdAt,omitempty"`
// Due is when the return is due to the IRS.
Due *string `json:"due,omitempty"`
// Forms are the form ids the filing carries.
Forms []string `json:"forms,omitempty"`
// ID is the filing's id, \"iris_\"-prefixed.
Id *string `json:"id,omitempty"`
// Kind is 1099-NEC or 1099-MISC — one per filing, as IRIS takes them.
Kind *string `json:"kind,omitempty"`
// Layout says what the files are.
Layout *string `json:"layout,omitempty"`
// MissingTIN are forms filed with no recipient TIN.
MissingTin []string `json:"missingTin,omitempty"`
// Parts are its files.
Parts []TaxPart `json:"parts,omitempty"`
// ReceiptID is the Receipt ID IRIS returned, once the payer recorded one.
ReceiptId *string `json:"receiptId,omitempty"`
// Status is exported, submitted, accepted, accepted_with_errors or rejected. Only the payer's own record moves it past exported: nothing here submits.
Status *string `json:"status,omitempty"`
// Steps are what remains for the payer to do, in order.
Steps []string `json:"steps,omitempty"`
// TCC is the payer's IRIS Transmitter Control Code, once it recorded a submission.
Tcc *string `json:"tcc,omitempty"`
// UpdatedAt is when its status last moved, unix seconds.
UpdatedAt *int64 `json:"updatedAt,omitempty"`
// Year is the tax year.
Year *int64 `json:"year,omitempty"`
AdditionalProperties map[string]interface{}
}
type _TaxFiling TaxFiling
// NewTaxFiling instantiates a new TaxFiling 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 NewTaxFiling() *TaxFiling {
this := TaxFiling{}
return &this
}
// NewTaxFilingWithDefaults instantiates a new TaxFiling 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 NewTaxFilingWithDefaults() *TaxFiling {
this := TaxFiling{}
return &this
}
// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise.
func (o *TaxFiling) GetCreatedAt() int64 {
if o == nil || IsNil(o.CreatedAt) {
var ret int64
return ret
}
return *o.CreatedAt
}
// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *TaxFiling) GetCreatedAtOk() (*int64, bool) {
if o == nil || IsNil(o.CreatedAt) {
return nil, false
}
return o.CreatedAt, true
}
// HasCreatedAt returns a boolean if a field has been set.
func (o *TaxFiling) HasCreatedAt() bool {
if o != nil && !IsNil(o.CreatedAt) {
return true
}
return false
}
// SetCreatedAt gets a reference to the given int64 and assigns it to the CreatedAt field.
func (o *TaxFiling) SetCreatedAt(v int64) {
o.CreatedAt = &v
}
// GetDue returns the Due field value if set, zero value otherwise.
func (o *TaxFiling) GetDue() string {
if o == nil || IsNil(o.Due) {
var ret string
return ret
}
return *o.Due
}
// GetDueOk returns a tuple with the Due field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *TaxFiling) GetDueOk() (*string, bool) {
if o == nil || IsNil(o.Due) {
return nil, false
}
return o.Due, true
}
// HasDue returns a boolean if a field has been set.
func (o *TaxFiling) HasDue() bool {
if o != nil && !IsNil(o.Due) {
return true
}
return false
}
// SetDue gets a reference to the given string and assigns it to the Due field.
func (o *TaxFiling) SetDue(v string) {
o.Due = &v
}
// GetForms returns the Forms field value if set, zero value otherwise.
func (o *TaxFiling) GetForms() []string {
if o == nil || IsNil(o.Forms) {
var ret []string
return ret
}
return o.Forms
}
// GetFormsOk returns a tuple with the Forms field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *TaxFiling) GetFormsOk() ([]string, bool) {
if o == nil || IsNil(o.Forms) {
return nil, false
}
return o.Forms, true
}
// HasForms returns a boolean if a field has been set.
func (o *TaxFiling) HasForms() bool {
if o != nil && !IsNil(o.Forms) {
return true
}
return false
}
// SetForms gets a reference to the given []string and assigns it to the Forms field.
func (o *TaxFiling) SetForms(v []string) {
o.Forms = v
}
// GetId returns the Id field value if set, zero value otherwise.
func (o *TaxFiling) 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 *TaxFiling) 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 *TaxFiling) 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 *TaxFiling) SetId(v string) {
o.Id = &v
}
// GetKind returns the Kind field value if set, zero value otherwise.
func (o *TaxFiling) 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 *TaxFiling) 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 *TaxFiling) 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 *TaxFiling) SetKind(v string) {
o.Kind = &v
}
// GetLayout returns the Layout field value if set, zero value otherwise.
func (o *TaxFiling) GetLayout() string {
if o == nil || IsNil(o.Layout) {
var ret string
return ret
}
return *o.Layout
}
// GetLayoutOk returns a tuple with the Layout field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *TaxFiling) GetLayoutOk() (*string, bool) {
if o == nil || IsNil(o.Layout) {
return nil, false
}
return o.Layout, true
}
// HasLayout returns a boolean if a field has been set.
func (o *TaxFiling) HasLayout() bool {
if o != nil && !IsNil(o.Layout) {
return true
}
return false
}
// SetLayout gets a reference to the given string and assigns it to the Layout field.
func (o *TaxFiling) SetLayout(v string) {
o.Layout = &v
}
// GetMissingTin returns the MissingTin field value if set, zero value otherwise.
func (o *TaxFiling) GetMissingTin() []string {
if o == nil || IsNil(o.MissingTin) {
var ret []string
return ret
}
return o.MissingTin
}
// GetMissingTinOk returns a tuple with the MissingTin field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *TaxFiling) GetMissingTinOk() ([]string, bool) {
if o == nil || IsNil(o.MissingTin) {
return nil, false
}
return o.MissingTin, true
}
// HasMissingTin returns a boolean if a field has been set.
func (o *TaxFiling) HasMissingTin() bool {
if o != nil && !IsNil(o.MissingTin) {
return true
}
return false
}
// SetMissingTin gets a reference to the given []string and assigns it to the MissingTin field.
func (o *TaxFiling) SetMissingTin(v []string) {
o.MissingTin = v
}
// GetParts returns the Parts field value if set, zero value otherwise.
func (o *TaxFiling) GetParts() []TaxPart {
if o == nil || IsNil(o.Parts) {
var ret []TaxPart
return ret
}
return o.Parts
}
// GetPartsOk returns a tuple with the Parts field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *TaxFiling) GetPartsOk() ([]TaxPart, bool) {
if o == nil || IsNil(o.Parts) {
return nil, false
}
return o.Parts, true
}
// HasParts returns a boolean if a field has been set.
func (o *TaxFiling) HasParts() bool {
if o != nil && !IsNil(o.Parts) {
return true
}
return false
}
// SetParts gets a reference to the given []TaxPart and assigns it to the Parts field.
func (o *TaxFiling) SetParts(v []TaxPart) {
o.Parts = v
}
// GetReceiptId returns the ReceiptId field value if set, zero value otherwise.
func (o *TaxFiling) GetReceiptId() string {
if o == nil || IsNil(o.ReceiptId) {
var ret string
return ret
}
return *o.ReceiptId
}
// GetReceiptIdOk returns a tuple with the ReceiptId field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *TaxFiling) GetReceiptIdOk() (*string, bool) {
if o == nil || IsNil(o.ReceiptId) {
return nil, false
}
return o.ReceiptId, true
}
// HasReceiptId returns a boolean if a field has been set.
func (o *TaxFiling) HasReceiptId() bool {
if o != nil && !IsNil(o.ReceiptId) {
return true
}
return false
}
// SetReceiptId gets a reference to the given string and assigns it to the ReceiptId field.
func (o *TaxFiling) SetReceiptId(v string) {
o.ReceiptId = &v
}
// GetStatus returns the Status field value if set, zero value otherwise.
func (o *TaxFiling) 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 *TaxFiling) 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 *TaxFiling) 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 *TaxFiling) SetStatus(v string) {
o.Status = &v
}
// GetSteps returns the Steps field value if set, zero value otherwise.
func (o *TaxFiling) GetSteps() []string {
if o == nil || IsNil(o.Steps) {
var ret []string
return ret
}
return o.Steps
}
// GetStepsOk returns a tuple with the Steps field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *TaxFiling) GetStepsOk() ([]string, bool) {
if o == nil || IsNil(o.Steps) {
return nil, false
}
return o.Steps, true
}
// HasSteps returns a boolean if a field has been set.
func (o *TaxFiling) HasSteps() bool {
if o != nil && !IsNil(o.Steps) {
return true
}
return false
}
// SetSteps gets a reference to the given []string and assigns it to the Steps field.
func (o *TaxFiling) SetSteps(v []string) {
o.Steps = v
}
// GetTcc returns the Tcc field value if set, zero value otherwise.
func (o *TaxFiling) GetTcc() string {
if o == nil || IsNil(o.Tcc) {
var ret string
return ret
}
return *o.Tcc
}
// GetTccOk returns a tuple with the Tcc field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *TaxFiling) GetTccOk() (*string, bool) {
if o == nil || IsNil(o.Tcc) {
return nil, false
}
return o.Tcc, true
}
// HasTcc returns a boolean if a field has been set.
func (o *TaxFiling) HasTcc() bool {
if o != nil && !IsNil(o.Tcc) {
return true
}
return false
}
// SetTcc gets a reference to the given string and assigns it to the Tcc field.
func (o *TaxFiling) SetTcc(v string) {
o.Tcc = &v
}
// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise.
func (o *TaxFiling) GetUpdatedAt() int64 {
if o == nil || IsNil(o.UpdatedAt) {
var ret int64
return ret
}
return *o.UpdatedAt
}
// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *TaxFiling) GetUpdatedAtOk() (*int64, bool) {
if o == nil || IsNil(o.UpdatedAt) {
return nil, false
}
return o.UpdatedAt, true
}
// HasUpdatedAt returns a boolean if a field has been set.
func (o *TaxFiling) HasUpdatedAt() bool {
if o != nil && !IsNil(o.UpdatedAt) {
return true
}
return false
}
// SetUpdatedAt gets a reference to the given int64 and assigns it to the UpdatedAt field.
func (o *TaxFiling) SetUpdatedAt(v int64) {
o.UpdatedAt = &v
}
// GetYear returns the Year field value if set, zero value otherwise.
func (o *TaxFiling) 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 *TaxFiling) 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 *TaxFiling) 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 *TaxFiling) SetYear(v int64) {
o.Year = &v
}
func (o TaxFiling) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o TaxFiling) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.CreatedAt) {
toSerialize["createdAt"] = o.CreatedAt
}
if !IsNil(o.Due) {
toSerialize["due"] = o.Due
}
if !IsNil(o.Forms) {
toSerialize["forms"] = o.Forms
}
if !IsNil(o.Id) {
toSerialize["id"] = o.Id
}
if !IsNil(o.Kind) {
toSerialize["kind"] = o.Kind
}
if !IsNil(o.Layout) {
toSerialize["layout"] = o.Layout
}
if !IsNil(o.MissingTin) {
toSerialize["missingTin"] = o.MissingTin
}
if !IsNil(o.Parts) {
toSerialize["parts"] = o.Parts
}
if !IsNil(o.ReceiptId) {
toSerialize["receiptId"] = o.ReceiptId
}
if !IsNil(o.Status) {
toSerialize["status"] = o.Status
}
if !IsNil(o.Steps) {
toSerialize["steps"] = o.Steps
}
if !IsNil(o.Tcc) {
toSerialize["tcc"] = o.Tcc
}
if !IsNil(o.UpdatedAt) {
toSerialize["updatedAt"] = o.UpdatedAt
}
if !IsNil(o.Year) {
toSerialize["year"] = o.Year
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *TaxFiling) UnmarshalJSON(data []byte) (err error) {
varTaxFiling := _TaxFiling{}
err = json.Unmarshal(data, &varTaxFiling)
if err != nil {
return err
}
*o = TaxFiling(varTaxFiling)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "createdAt")
delete(additionalProperties, "due")
delete(additionalProperties, "forms")
delete(additionalProperties, "id")
delete(additionalProperties, "kind")
delete(additionalProperties, "layout")
delete(additionalProperties, "missingTin")
delete(additionalProperties, "parts")
delete(additionalProperties, "receiptId")
delete(additionalProperties, "status")
delete(additionalProperties, "steps")
delete(additionalProperties, "tcc")
delete(additionalProperties, "updatedAt")
delete(additionalProperties, "year")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableTaxFiling struct {
value *TaxFiling
isSet bool
}
func (v NullableTaxFiling) Get() *TaxFiling {
return v.value
}
func (v *NullableTaxFiling) Set(val *TaxFiling) {
v.value = val
v.isSet = true
}
func (v NullableTaxFiling) IsSet() bool {
return v.isSet
}
func (v *NullableTaxFiling) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableTaxFiling(val *TaxFiling) *NullableTaxFiling {
return &NullableTaxFiling{value: val, isSet: true}
}
func (v NullableTaxFiling) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableTaxFiling) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}