Files
sdk/model_marketplace_statement.go

497 lines
13 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 MarketplaceStatement type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &MarketplaceStatement{}
// MarketplaceStatement struct for MarketplaceStatement
type MarketplaceStatement struct {
// Agent is the agent it is about.
Agent *string `json:"agent,omitempty"`
// Expires is when it stops standing, unix seconds; zero for a W-9, which stands until the form changes.
Expires *int64 `json:"expires,omitempty"`
// Form is the class of tax form it rests on: w9, w8ben or w8bene.
Form *string `json:"form,omitempty"`
// ID is the statement's jti.
Id *string `json:"id,omitempty"`
// Issued is when it was signed, unix seconds.
Issued *int64 `json:"issued,omitempty"`
// JWS is the signed statement itself — the credential an agent presents — answered only to the org it is about.
Jws *string `json:"jws,omitempty"`
// Kind is what it states: tax.
Kind *string `json:"kind,omitempty"`
// Org is the principal the agent answers to.
Org *string `json:"org,omitempty"`
// Revoked is when it was withdrawn, unix seconds; zero while it stands.
Revoked *int64 `json:"revoked,omitempty"`
// Status is live, expired or revoked.
Status *string `json:"status,omitempty"`
AdditionalProperties map[string]interface{}
}
type _MarketplaceStatement MarketplaceStatement
// NewMarketplaceStatement instantiates a new MarketplaceStatement 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 NewMarketplaceStatement() *MarketplaceStatement {
this := MarketplaceStatement{}
return &this
}
// NewMarketplaceStatementWithDefaults instantiates a new MarketplaceStatement 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 NewMarketplaceStatementWithDefaults() *MarketplaceStatement {
this := MarketplaceStatement{}
return &this
}
// GetAgent returns the Agent field value if set, zero value otherwise.
func (o *MarketplaceStatement) GetAgent() string {
if o == nil || IsNil(o.Agent) {
var ret string
return ret
}
return *o.Agent
}
// GetAgentOk returns a tuple with the Agent field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *MarketplaceStatement) GetAgentOk() (*string, bool) {
if o == nil || IsNil(o.Agent) {
return nil, false
}
return o.Agent, true
}
// HasAgent returns a boolean if a field has been set.
func (o *MarketplaceStatement) HasAgent() bool {
if o != nil && !IsNil(o.Agent) {
return true
}
return false
}
// SetAgent gets a reference to the given string and assigns it to the Agent field.
func (o *MarketplaceStatement) SetAgent(v string) {
o.Agent = &v
}
// GetExpires returns the Expires field value if set, zero value otherwise.
func (o *MarketplaceStatement) GetExpires() int64 {
if o == nil || IsNil(o.Expires) {
var ret int64
return ret
}
return *o.Expires
}
// GetExpiresOk returns a tuple with the Expires field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *MarketplaceStatement) GetExpiresOk() (*int64, bool) {
if o == nil || IsNil(o.Expires) {
return nil, false
}
return o.Expires, true
}
// HasExpires returns a boolean if a field has been set.
func (o *MarketplaceStatement) HasExpires() bool {
if o != nil && !IsNil(o.Expires) {
return true
}
return false
}
// SetExpires gets a reference to the given int64 and assigns it to the Expires field.
func (o *MarketplaceStatement) SetExpires(v int64) {
o.Expires = &v
}
// GetForm returns the Form field value if set, zero value otherwise.
func (o *MarketplaceStatement) GetForm() string {
if o == nil || IsNil(o.Form) {
var ret string
return ret
}
return *o.Form
}
// GetFormOk returns a tuple with the Form field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *MarketplaceStatement) GetFormOk() (*string, bool) {
if o == nil || IsNil(o.Form) {
return nil, false
}
return o.Form, true
}
// HasForm returns a boolean if a field has been set.
func (o *MarketplaceStatement) HasForm() bool {
if o != nil && !IsNil(o.Form) {
return true
}
return false
}
// SetForm gets a reference to the given string and assigns it to the Form field.
func (o *MarketplaceStatement) SetForm(v string) {
o.Form = &v
}
// GetId returns the Id field value if set, zero value otherwise.
func (o *MarketplaceStatement) 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 *MarketplaceStatement) 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 *MarketplaceStatement) 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 *MarketplaceStatement) SetId(v string) {
o.Id = &v
}
// GetIssued returns the Issued field value if set, zero value otherwise.
func (o *MarketplaceStatement) GetIssued() int64 {
if o == nil || IsNil(o.Issued) {
var ret int64
return ret
}
return *o.Issued
}
// GetIssuedOk returns a tuple with the Issued field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *MarketplaceStatement) GetIssuedOk() (*int64, bool) {
if o == nil || IsNil(o.Issued) {
return nil, false
}
return o.Issued, true
}
// HasIssued returns a boolean if a field has been set.
func (o *MarketplaceStatement) HasIssued() bool {
if o != nil && !IsNil(o.Issued) {
return true
}
return false
}
// SetIssued gets a reference to the given int64 and assigns it to the Issued field.
func (o *MarketplaceStatement) SetIssued(v int64) {
o.Issued = &v
}
// GetJws returns the Jws field value if set, zero value otherwise.
func (o *MarketplaceStatement) GetJws() string {
if o == nil || IsNil(o.Jws) {
var ret string
return ret
}
return *o.Jws
}
// GetJwsOk returns a tuple with the Jws field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *MarketplaceStatement) GetJwsOk() (*string, bool) {
if o == nil || IsNil(o.Jws) {
return nil, false
}
return o.Jws, true
}
// HasJws returns a boolean if a field has been set.
func (o *MarketplaceStatement) HasJws() bool {
if o != nil && !IsNil(o.Jws) {
return true
}
return false
}
// SetJws gets a reference to the given string and assigns it to the Jws field.
func (o *MarketplaceStatement) SetJws(v string) {
o.Jws = &v
}
// GetKind returns the Kind field value if set, zero value otherwise.
func (o *MarketplaceStatement) 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 *MarketplaceStatement) 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 *MarketplaceStatement) 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 *MarketplaceStatement) SetKind(v string) {
o.Kind = &v
}
// GetOrg returns the Org field value if set, zero value otherwise.
func (o *MarketplaceStatement) GetOrg() string {
if o == nil || IsNil(o.Org) {
var ret string
return ret
}
return *o.Org
}
// GetOrgOk returns a tuple with the Org field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *MarketplaceStatement) GetOrgOk() (*string, bool) {
if o == nil || IsNil(o.Org) {
return nil, false
}
return o.Org, true
}
// HasOrg returns a boolean if a field has been set.
func (o *MarketplaceStatement) HasOrg() bool {
if o != nil && !IsNil(o.Org) {
return true
}
return false
}
// SetOrg gets a reference to the given string and assigns it to the Org field.
func (o *MarketplaceStatement) SetOrg(v string) {
o.Org = &v
}
// GetRevoked returns the Revoked field value if set, zero value otherwise.
func (o *MarketplaceStatement) GetRevoked() int64 {
if o == nil || IsNil(o.Revoked) {
var ret int64
return ret
}
return *o.Revoked
}
// GetRevokedOk returns a tuple with the Revoked field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *MarketplaceStatement) GetRevokedOk() (*int64, bool) {
if o == nil || IsNil(o.Revoked) {
return nil, false
}
return o.Revoked, true
}
// HasRevoked returns a boolean if a field has been set.
func (o *MarketplaceStatement) HasRevoked() bool {
if o != nil && !IsNil(o.Revoked) {
return true
}
return false
}
// SetRevoked gets a reference to the given int64 and assigns it to the Revoked field.
func (o *MarketplaceStatement) SetRevoked(v int64) {
o.Revoked = &v
}
// GetStatus returns the Status field value if set, zero value otherwise.
func (o *MarketplaceStatement) 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 *MarketplaceStatement) 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 *MarketplaceStatement) 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 *MarketplaceStatement) SetStatus(v string) {
o.Status = &v
}
func (o MarketplaceStatement) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o MarketplaceStatement) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Agent) {
toSerialize["agent"] = o.Agent
}
if !IsNil(o.Expires) {
toSerialize["expires"] = o.Expires
}
if !IsNil(o.Form) {
toSerialize["form"] = o.Form
}
if !IsNil(o.Id) {
toSerialize["id"] = o.Id
}
if !IsNil(o.Issued) {
toSerialize["issued"] = o.Issued
}
if !IsNil(o.Jws) {
toSerialize["jws"] = o.Jws
}
if !IsNil(o.Kind) {
toSerialize["kind"] = o.Kind
}
if !IsNil(o.Org) {
toSerialize["org"] = o.Org
}
if !IsNil(o.Revoked) {
toSerialize["revoked"] = o.Revoked
}
if !IsNil(o.Status) {
toSerialize["status"] = o.Status
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *MarketplaceStatement) UnmarshalJSON(data []byte) (err error) {
varMarketplaceStatement := _MarketplaceStatement{}
err = json.Unmarshal(data, &varMarketplaceStatement)
if err != nil {
return err
}
*o = MarketplaceStatement(varMarketplaceStatement)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "agent")
delete(additionalProperties, "expires")
delete(additionalProperties, "form")
delete(additionalProperties, "id")
delete(additionalProperties, "issued")
delete(additionalProperties, "jws")
delete(additionalProperties, "kind")
delete(additionalProperties, "org")
delete(additionalProperties, "revoked")
delete(additionalProperties, "status")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableMarketplaceStatement struct {
value *MarketplaceStatement
isSet bool
}
func (v NullableMarketplaceStatement) Get() *MarketplaceStatement {
return v.value
}
func (v *NullableMarketplaceStatement) Set(val *MarketplaceStatement) {
v.value = val
v.isSet = true
}
func (v NullableMarketplaceStatement) IsSet() bool {
return v.isSet
}
func (v *NullableMarketplaceStatement) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableMarketplaceStatement(val *MarketplaceStatement) *NullableMarketplaceStatement {
return &NullableMarketplaceStatement{value: val, isSet: true}
}
func (v NullableMarketplaceStatement) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableMarketplaceStatement) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}