Files
sdk/model_principal_view.go

459 lines
12 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 PrincipalView type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &PrincipalView{}
// PrincipalView struct for PrincipalView
type PrincipalView struct {
// Agents are the agents that answer to it, spawned ones with their parent.
Agents []PrincipalAgentBrief `json:"agents,omitempty"`
// Compliance is what it lacks to pay and be paid on the platform's rails.
Compliance *PrincipalSummary `json:"compliance,omitempty"`
// Entity is its legal entity, when it formed or imported one here.
Entity *PrincipalEntity `json:"entity,omitempty"`
// Identity is whether its founders are verified.
Identity *PrincipalIdentity `json:"identity,omitempty"`
// Org is the org — the principal itself.
Org *string `json:"org,omitempty"`
// Sanctions is its screening against the OFAC, UN, EU and UK lists and the embargoed jurisdictions, run on this read and recorded by none: a match is recorded for a reviewer when a payment to or from the org is cleared. Matches are answered to the org's admins.
Sanctions *PrincipalScreening `json:"sanctions,omitempty"`
// Sources says which owning apps answered.
Sources []PrincipalSource `json:"sources,omitempty"`
// Tax is the form it certified about itself.
Tax *PrincipalForm `json:"tax,omitempty"`
// Wallets are its addresses.
Wallets []PrincipalWalletBrief `json:"wallets,omitempty"`
AdditionalProperties map[string]interface{}
}
type _PrincipalView PrincipalView
// NewPrincipalView instantiates a new PrincipalView 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 NewPrincipalView() *PrincipalView {
this := PrincipalView{}
return &this
}
// NewPrincipalViewWithDefaults instantiates a new PrincipalView 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 NewPrincipalViewWithDefaults() *PrincipalView {
this := PrincipalView{}
return &this
}
// GetAgents returns the Agents field value if set, zero value otherwise.
func (o *PrincipalView) GetAgents() []PrincipalAgentBrief {
if o == nil || IsNil(o.Agents) {
var ret []PrincipalAgentBrief
return ret
}
return o.Agents
}
// GetAgentsOk returns a tuple with the Agents field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PrincipalView) GetAgentsOk() ([]PrincipalAgentBrief, bool) {
if o == nil || IsNil(o.Agents) {
return nil, false
}
return o.Agents, true
}
// HasAgents returns a boolean if a field has been set.
func (o *PrincipalView) HasAgents() bool {
if o != nil && !IsNil(o.Agents) {
return true
}
return false
}
// SetAgents gets a reference to the given []PrincipalAgentBrief and assigns it to the Agents field.
func (o *PrincipalView) SetAgents(v []PrincipalAgentBrief) {
o.Agents = v
}
// GetCompliance returns the Compliance field value if set, zero value otherwise.
func (o *PrincipalView) GetCompliance() PrincipalSummary {
if o == nil || IsNil(o.Compliance) {
var ret PrincipalSummary
return ret
}
return *o.Compliance
}
// GetComplianceOk returns a tuple with the Compliance field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PrincipalView) GetComplianceOk() (*PrincipalSummary, bool) {
if o == nil || IsNil(o.Compliance) {
return nil, false
}
return o.Compliance, true
}
// HasCompliance returns a boolean if a field has been set.
func (o *PrincipalView) HasCompliance() bool {
if o != nil && !IsNil(o.Compliance) {
return true
}
return false
}
// SetCompliance gets a reference to the given PrincipalSummary and assigns it to the Compliance field.
func (o *PrincipalView) SetCompliance(v PrincipalSummary) {
o.Compliance = &v
}
// GetEntity returns the Entity field value if set, zero value otherwise.
func (o *PrincipalView) GetEntity() PrincipalEntity {
if o == nil || IsNil(o.Entity) {
var ret PrincipalEntity
return ret
}
return *o.Entity
}
// GetEntityOk returns a tuple with the Entity field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PrincipalView) GetEntityOk() (*PrincipalEntity, bool) {
if o == nil || IsNil(o.Entity) {
return nil, false
}
return o.Entity, true
}
// HasEntity returns a boolean if a field has been set.
func (o *PrincipalView) HasEntity() bool {
if o != nil && !IsNil(o.Entity) {
return true
}
return false
}
// SetEntity gets a reference to the given PrincipalEntity and assigns it to the Entity field.
func (o *PrincipalView) SetEntity(v PrincipalEntity) {
o.Entity = &v
}
// GetIdentity returns the Identity field value if set, zero value otherwise.
func (o *PrincipalView) GetIdentity() PrincipalIdentity {
if o == nil || IsNil(o.Identity) {
var ret PrincipalIdentity
return ret
}
return *o.Identity
}
// GetIdentityOk returns a tuple with the Identity field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PrincipalView) GetIdentityOk() (*PrincipalIdentity, bool) {
if o == nil || IsNil(o.Identity) {
return nil, false
}
return o.Identity, true
}
// HasIdentity returns a boolean if a field has been set.
func (o *PrincipalView) HasIdentity() bool {
if o != nil && !IsNil(o.Identity) {
return true
}
return false
}
// SetIdentity gets a reference to the given PrincipalIdentity and assigns it to the Identity field.
func (o *PrincipalView) SetIdentity(v PrincipalIdentity) {
o.Identity = &v
}
// GetOrg returns the Org field value if set, zero value otherwise.
func (o *PrincipalView) 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 *PrincipalView) 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 *PrincipalView) 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 *PrincipalView) SetOrg(v string) {
o.Org = &v
}
// GetSanctions returns the Sanctions field value if set, zero value otherwise.
func (o *PrincipalView) GetSanctions() PrincipalScreening {
if o == nil || IsNil(o.Sanctions) {
var ret PrincipalScreening
return ret
}
return *o.Sanctions
}
// GetSanctionsOk returns a tuple with the Sanctions field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PrincipalView) GetSanctionsOk() (*PrincipalScreening, bool) {
if o == nil || IsNil(o.Sanctions) {
return nil, false
}
return o.Sanctions, true
}
// HasSanctions returns a boolean if a field has been set.
func (o *PrincipalView) HasSanctions() bool {
if o != nil && !IsNil(o.Sanctions) {
return true
}
return false
}
// SetSanctions gets a reference to the given PrincipalScreening and assigns it to the Sanctions field.
func (o *PrincipalView) SetSanctions(v PrincipalScreening) {
o.Sanctions = &v
}
// GetSources returns the Sources field value if set, zero value otherwise.
func (o *PrincipalView) GetSources() []PrincipalSource {
if o == nil || IsNil(o.Sources) {
var ret []PrincipalSource
return ret
}
return o.Sources
}
// GetSourcesOk returns a tuple with the Sources field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PrincipalView) GetSourcesOk() ([]PrincipalSource, bool) {
if o == nil || IsNil(o.Sources) {
return nil, false
}
return o.Sources, true
}
// HasSources returns a boolean if a field has been set.
func (o *PrincipalView) HasSources() bool {
if o != nil && !IsNil(o.Sources) {
return true
}
return false
}
// SetSources gets a reference to the given []PrincipalSource and assigns it to the Sources field.
func (o *PrincipalView) SetSources(v []PrincipalSource) {
o.Sources = v
}
// GetTax returns the Tax field value if set, zero value otherwise.
func (o *PrincipalView) GetTax() PrincipalForm {
if o == nil || IsNil(o.Tax) {
var ret PrincipalForm
return ret
}
return *o.Tax
}
// GetTaxOk returns a tuple with the Tax field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PrincipalView) GetTaxOk() (*PrincipalForm, bool) {
if o == nil || IsNil(o.Tax) {
return nil, false
}
return o.Tax, true
}
// HasTax returns a boolean if a field has been set.
func (o *PrincipalView) HasTax() bool {
if o != nil && !IsNil(o.Tax) {
return true
}
return false
}
// SetTax gets a reference to the given PrincipalForm and assigns it to the Tax field.
func (o *PrincipalView) SetTax(v PrincipalForm) {
o.Tax = &v
}
// GetWallets returns the Wallets field value if set, zero value otherwise.
func (o *PrincipalView) GetWallets() []PrincipalWalletBrief {
if o == nil || IsNil(o.Wallets) {
var ret []PrincipalWalletBrief
return ret
}
return o.Wallets
}
// GetWalletsOk returns a tuple with the Wallets field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PrincipalView) GetWalletsOk() ([]PrincipalWalletBrief, bool) {
if o == nil || IsNil(o.Wallets) {
return nil, false
}
return o.Wallets, true
}
// HasWallets returns a boolean if a field has been set.
func (o *PrincipalView) HasWallets() bool {
if o != nil && !IsNil(o.Wallets) {
return true
}
return false
}
// SetWallets gets a reference to the given []PrincipalWalletBrief and assigns it to the Wallets field.
func (o *PrincipalView) SetWallets(v []PrincipalWalletBrief) {
o.Wallets = v
}
func (o PrincipalView) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o PrincipalView) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Agents) {
toSerialize["agents"] = o.Agents
}
if !IsNil(o.Compliance) {
toSerialize["compliance"] = o.Compliance
}
if !IsNil(o.Entity) {
toSerialize["entity"] = o.Entity
}
if !IsNil(o.Identity) {
toSerialize["identity"] = o.Identity
}
if !IsNil(o.Org) {
toSerialize["org"] = o.Org
}
if !IsNil(o.Sanctions) {
toSerialize["sanctions"] = o.Sanctions
}
if !IsNil(o.Sources) {
toSerialize["sources"] = o.Sources
}
if !IsNil(o.Tax) {
toSerialize["tax"] = o.Tax
}
if !IsNil(o.Wallets) {
toSerialize["wallets"] = o.Wallets
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *PrincipalView) UnmarshalJSON(data []byte) (err error) {
varPrincipalView := _PrincipalView{}
err = json.Unmarshal(data, &varPrincipalView)
if err != nil {
return err
}
*o = PrincipalView(varPrincipalView)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "agents")
delete(additionalProperties, "compliance")
delete(additionalProperties, "entity")
delete(additionalProperties, "identity")
delete(additionalProperties, "org")
delete(additionalProperties, "sanctions")
delete(additionalProperties, "sources")
delete(additionalProperties, "tax")
delete(additionalProperties, "wallets")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullablePrincipalView struct {
value *PrincipalView
isSet bool
}
func (v NullablePrincipalView) Get() *PrincipalView {
return v.value
}
func (v *NullablePrincipalView) Set(val *PrincipalView) {
v.value = val
v.isSet = true
}
func (v NullablePrincipalView) IsSet() bool {
return v.isSet
}
func (v *NullablePrincipalView) Unset() {
v.value = nil
v.isSet = false
}
func NewNullablePrincipalView(val *PrincipalView) *NullablePrincipalView {
return &NullablePrincipalView{value: val, isSet: true}
}
func (v NullablePrincipalView) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullablePrincipalView) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}