Files
sdk/model_tax_certification.go

345 lines
9.2 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 TaxCertification type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &TaxCertification{}
// TaxCertification struct for TaxCertification
type TaxCertification struct {
// By is who signed it: the IAM user legal recorded completing the signature.
By *string `json:"by,omitempty"`
// Document is the /v1/legal document that carries the signature.
Document *string `json:"document,omitempty"`
// Signed is when legal reported the document signed, unix seconds.
Signed *int64 `json:"signed,omitempty"`
// Signer is the IAM user the signature was opened for — the admin who asked. Only that user's completion certifies: a completion anyone else recorded is not their signature, and a fresh request is opened in its place.
Signer *string `json:"signer,omitempty"`
// Status is none, pending (a signature is open) or certified.
Status *string `json:"status,omitempty"`
// Version is the profile version the signature covers. Changing any W-9 fact makes a new version, and the certification no longer covers it.
Version *int64 `json:"version,omitempty"`
AdditionalProperties map[string]interface{}
}
type _TaxCertification TaxCertification
// NewTaxCertification instantiates a new TaxCertification 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 NewTaxCertification() *TaxCertification {
this := TaxCertification{}
return &this
}
// NewTaxCertificationWithDefaults instantiates a new TaxCertification 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 NewTaxCertificationWithDefaults() *TaxCertification {
this := TaxCertification{}
return &this
}
// GetBy returns the By field value if set, zero value otherwise.
func (o *TaxCertification) GetBy() string {
if o == nil || IsNil(o.By) {
var ret string
return ret
}
return *o.By
}
// GetByOk returns a tuple with the By field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *TaxCertification) GetByOk() (*string, bool) {
if o == nil || IsNil(o.By) {
return nil, false
}
return o.By, true
}
// HasBy returns a boolean if a field has been set.
func (o *TaxCertification) HasBy() bool {
if o != nil && !IsNil(o.By) {
return true
}
return false
}
// SetBy gets a reference to the given string and assigns it to the By field.
func (o *TaxCertification) SetBy(v string) {
o.By = &v
}
// GetDocument returns the Document field value if set, zero value otherwise.
func (o *TaxCertification) GetDocument() string {
if o == nil || IsNil(o.Document) {
var ret string
return ret
}
return *o.Document
}
// GetDocumentOk returns a tuple with the Document field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *TaxCertification) GetDocumentOk() (*string, bool) {
if o == nil || IsNil(o.Document) {
return nil, false
}
return o.Document, true
}
// HasDocument returns a boolean if a field has been set.
func (o *TaxCertification) HasDocument() bool {
if o != nil && !IsNil(o.Document) {
return true
}
return false
}
// SetDocument gets a reference to the given string and assigns it to the Document field.
func (o *TaxCertification) SetDocument(v string) {
o.Document = &v
}
// GetSigned returns the Signed field value if set, zero value otherwise.
func (o *TaxCertification) GetSigned() int64 {
if o == nil || IsNil(o.Signed) {
var ret int64
return ret
}
return *o.Signed
}
// GetSignedOk returns a tuple with the Signed field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *TaxCertification) GetSignedOk() (*int64, bool) {
if o == nil || IsNil(o.Signed) {
return nil, false
}
return o.Signed, true
}
// HasSigned returns a boolean if a field has been set.
func (o *TaxCertification) HasSigned() bool {
if o != nil && !IsNil(o.Signed) {
return true
}
return false
}
// SetSigned gets a reference to the given int64 and assigns it to the Signed field.
func (o *TaxCertification) SetSigned(v int64) {
o.Signed = &v
}
// GetSigner returns the Signer field value if set, zero value otherwise.
func (o *TaxCertification) GetSigner() string {
if o == nil || IsNil(o.Signer) {
var ret string
return ret
}
return *o.Signer
}
// GetSignerOk returns a tuple with the Signer field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *TaxCertification) GetSignerOk() (*string, bool) {
if o == nil || IsNil(o.Signer) {
return nil, false
}
return o.Signer, true
}
// HasSigner returns a boolean if a field has been set.
func (o *TaxCertification) HasSigner() bool {
if o != nil && !IsNil(o.Signer) {
return true
}
return false
}
// SetSigner gets a reference to the given string and assigns it to the Signer field.
func (o *TaxCertification) SetSigner(v string) {
o.Signer = &v
}
// GetStatus returns the Status field value if set, zero value otherwise.
func (o *TaxCertification) 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 *TaxCertification) 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 *TaxCertification) 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 *TaxCertification) SetStatus(v string) {
o.Status = &v
}
// GetVersion returns the Version field value if set, zero value otherwise.
func (o *TaxCertification) GetVersion() int64 {
if o == nil || IsNil(o.Version) {
var ret int64
return ret
}
return *o.Version
}
// GetVersionOk returns a tuple with the Version field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *TaxCertification) GetVersionOk() (*int64, bool) {
if o == nil || IsNil(o.Version) {
return nil, false
}
return o.Version, true
}
// HasVersion returns a boolean if a field has been set.
func (o *TaxCertification) HasVersion() bool {
if o != nil && !IsNil(o.Version) {
return true
}
return false
}
// SetVersion gets a reference to the given int64 and assigns it to the Version field.
func (o *TaxCertification) SetVersion(v int64) {
o.Version = &v
}
func (o TaxCertification) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o TaxCertification) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.By) {
toSerialize["by"] = o.By
}
if !IsNil(o.Document) {
toSerialize["document"] = o.Document
}
if !IsNil(o.Signed) {
toSerialize["signed"] = o.Signed
}
if !IsNil(o.Signer) {
toSerialize["signer"] = o.Signer
}
if !IsNil(o.Status) {
toSerialize["status"] = o.Status
}
if !IsNil(o.Version) {
toSerialize["version"] = o.Version
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *TaxCertification) UnmarshalJSON(data []byte) (err error) {
varTaxCertification := _TaxCertification{}
err = json.Unmarshal(data, &varTaxCertification)
if err != nil {
return err
}
*o = TaxCertification(varTaxCertification)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "by")
delete(additionalProperties, "document")
delete(additionalProperties, "signed")
delete(additionalProperties, "signer")
delete(additionalProperties, "status")
delete(additionalProperties, "version")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableTaxCertification struct {
value *TaxCertification
isSet bool
}
func (v NullableTaxCertification) Get() *TaxCertification {
return v.value
}
func (v *NullableTaxCertification) Set(val *TaxCertification) {
v.value = val
v.isSet = true
}
func (v NullableTaxCertification) IsSet() bool {
return v.isSet
}
func (v *NullableTaxCertification) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableTaxCertification(val *TaxCertification) *NullableTaxCertification {
return &NullableTaxCertification{value: val, isSet: true}
}
func (v NullableTaxCertification) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableTaxCertification) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}