mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
383 lines
10 KiB
Go
383 lines
10 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 PrincipalEntity type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &PrincipalEntity{}
|
|
|
|
// PrincipalEntity struct for PrincipalEntity
|
|
type PrincipalEntity struct {
|
|
// EIN is on_file when the org's W-9 carries an EIN, and absent otherwise.
|
|
Ein *string `json:"ein,omitempty"`
|
|
// Founders are its beneficial owners with their verification status — answered to the org's admins.
|
|
Founders []PrincipalFounder `json:"founders,omitempty"`
|
|
// Imported is an entity that existed before and was imported.
|
|
Imported *bool `json:"imported,omitempty"`
|
|
// Jurisdiction is the U.S. state of formation.
|
|
Jurisdiction *string `json:"jurisdiction,omitempty"`
|
|
// Name is the company name.
|
|
Name *string `json:"name,omitempty"`
|
|
// Stage is the formation's stage; \"company\" is formed.
|
|
Stage *string `json:"stage,omitempty"`
|
|
// Structure is c-corp, llc or dao-llc.
|
|
Structure *string `json:"structure,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _PrincipalEntity PrincipalEntity
|
|
|
|
// NewPrincipalEntity instantiates a new PrincipalEntity 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 NewPrincipalEntity() *PrincipalEntity {
|
|
this := PrincipalEntity{}
|
|
return &this
|
|
}
|
|
|
|
// NewPrincipalEntityWithDefaults instantiates a new PrincipalEntity 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 NewPrincipalEntityWithDefaults() *PrincipalEntity {
|
|
this := PrincipalEntity{}
|
|
return &this
|
|
}
|
|
|
|
// GetEin returns the Ein field value if set, zero value otherwise.
|
|
func (o *PrincipalEntity) GetEin() string {
|
|
if o == nil || IsNil(o.Ein) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Ein
|
|
}
|
|
|
|
// GetEinOk returns a tuple with the Ein field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *PrincipalEntity) GetEinOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Ein) {
|
|
return nil, false
|
|
}
|
|
return o.Ein, true
|
|
}
|
|
|
|
// HasEin returns a boolean if a field has been set.
|
|
func (o *PrincipalEntity) HasEin() bool {
|
|
if o != nil && !IsNil(o.Ein) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetEin gets a reference to the given string and assigns it to the Ein field.
|
|
func (o *PrincipalEntity) SetEin(v string) {
|
|
o.Ein = &v
|
|
}
|
|
|
|
// GetFounders returns the Founders field value if set, zero value otherwise.
|
|
func (o *PrincipalEntity) GetFounders() []PrincipalFounder {
|
|
if o == nil || IsNil(o.Founders) {
|
|
var ret []PrincipalFounder
|
|
return ret
|
|
}
|
|
return o.Founders
|
|
}
|
|
|
|
// GetFoundersOk returns a tuple with the Founders field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *PrincipalEntity) GetFoundersOk() ([]PrincipalFounder, bool) {
|
|
if o == nil || IsNil(o.Founders) {
|
|
return nil, false
|
|
}
|
|
return o.Founders, true
|
|
}
|
|
|
|
// HasFounders returns a boolean if a field has been set.
|
|
func (o *PrincipalEntity) HasFounders() bool {
|
|
if o != nil && !IsNil(o.Founders) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetFounders gets a reference to the given []PrincipalFounder and assigns it to the Founders field.
|
|
func (o *PrincipalEntity) SetFounders(v []PrincipalFounder) {
|
|
o.Founders = v
|
|
}
|
|
|
|
// GetImported returns the Imported field value if set, zero value otherwise.
|
|
func (o *PrincipalEntity) GetImported() bool {
|
|
if o == nil || IsNil(o.Imported) {
|
|
var ret bool
|
|
return ret
|
|
}
|
|
return *o.Imported
|
|
}
|
|
|
|
// GetImportedOk returns a tuple with the Imported field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *PrincipalEntity) GetImportedOk() (*bool, bool) {
|
|
if o == nil || IsNil(o.Imported) {
|
|
return nil, false
|
|
}
|
|
return o.Imported, true
|
|
}
|
|
|
|
// HasImported returns a boolean if a field has been set.
|
|
func (o *PrincipalEntity) HasImported() bool {
|
|
if o != nil && !IsNil(o.Imported) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetImported gets a reference to the given bool and assigns it to the Imported field.
|
|
func (o *PrincipalEntity) SetImported(v bool) {
|
|
o.Imported = &v
|
|
}
|
|
|
|
// GetJurisdiction returns the Jurisdiction field value if set, zero value otherwise.
|
|
func (o *PrincipalEntity) GetJurisdiction() string {
|
|
if o == nil || IsNil(o.Jurisdiction) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Jurisdiction
|
|
}
|
|
|
|
// GetJurisdictionOk returns a tuple with the Jurisdiction field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *PrincipalEntity) GetJurisdictionOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Jurisdiction) {
|
|
return nil, false
|
|
}
|
|
return o.Jurisdiction, true
|
|
}
|
|
|
|
// HasJurisdiction returns a boolean if a field has been set.
|
|
func (o *PrincipalEntity) HasJurisdiction() bool {
|
|
if o != nil && !IsNil(o.Jurisdiction) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetJurisdiction gets a reference to the given string and assigns it to the Jurisdiction field.
|
|
func (o *PrincipalEntity) SetJurisdiction(v string) {
|
|
o.Jurisdiction = &v
|
|
}
|
|
|
|
// GetName returns the Name field value if set, zero value otherwise.
|
|
func (o *PrincipalEntity) GetName() string {
|
|
if o == nil || IsNil(o.Name) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Name
|
|
}
|
|
|
|
// GetNameOk returns a tuple with the Name field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *PrincipalEntity) GetNameOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Name) {
|
|
return nil, false
|
|
}
|
|
return o.Name, true
|
|
}
|
|
|
|
// HasName returns a boolean if a field has been set.
|
|
func (o *PrincipalEntity) HasName() bool {
|
|
if o != nil && !IsNil(o.Name) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetName gets a reference to the given string and assigns it to the Name field.
|
|
func (o *PrincipalEntity) SetName(v string) {
|
|
o.Name = &v
|
|
}
|
|
|
|
// GetStage returns the Stage field value if set, zero value otherwise.
|
|
func (o *PrincipalEntity) GetStage() string {
|
|
if o == nil || IsNil(o.Stage) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Stage
|
|
}
|
|
|
|
// GetStageOk returns a tuple with the Stage field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *PrincipalEntity) GetStageOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Stage) {
|
|
return nil, false
|
|
}
|
|
return o.Stage, true
|
|
}
|
|
|
|
// HasStage returns a boolean if a field has been set.
|
|
func (o *PrincipalEntity) HasStage() bool {
|
|
if o != nil && !IsNil(o.Stage) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetStage gets a reference to the given string and assigns it to the Stage field.
|
|
func (o *PrincipalEntity) SetStage(v string) {
|
|
o.Stage = &v
|
|
}
|
|
|
|
// GetStructure returns the Structure field value if set, zero value otherwise.
|
|
func (o *PrincipalEntity) GetStructure() string {
|
|
if o == nil || IsNil(o.Structure) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Structure
|
|
}
|
|
|
|
// GetStructureOk returns a tuple with the Structure field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *PrincipalEntity) GetStructureOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Structure) {
|
|
return nil, false
|
|
}
|
|
return o.Structure, true
|
|
}
|
|
|
|
// HasStructure returns a boolean if a field has been set.
|
|
func (o *PrincipalEntity) HasStructure() bool {
|
|
if o != nil && !IsNil(o.Structure) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetStructure gets a reference to the given string and assigns it to the Structure field.
|
|
func (o *PrincipalEntity) SetStructure(v string) {
|
|
o.Structure = &v
|
|
}
|
|
|
|
func (o PrincipalEntity) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o PrincipalEntity) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Ein) {
|
|
toSerialize["ein"] = o.Ein
|
|
}
|
|
if !IsNil(o.Founders) {
|
|
toSerialize["founders"] = o.Founders
|
|
}
|
|
if !IsNil(o.Imported) {
|
|
toSerialize["imported"] = o.Imported
|
|
}
|
|
if !IsNil(o.Jurisdiction) {
|
|
toSerialize["jurisdiction"] = o.Jurisdiction
|
|
}
|
|
if !IsNil(o.Name) {
|
|
toSerialize["name"] = o.Name
|
|
}
|
|
if !IsNil(o.Stage) {
|
|
toSerialize["stage"] = o.Stage
|
|
}
|
|
if !IsNil(o.Structure) {
|
|
toSerialize["structure"] = o.Structure
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *PrincipalEntity) UnmarshalJSON(data []byte) (err error) {
|
|
varPrincipalEntity := _PrincipalEntity{}
|
|
|
|
err = json.Unmarshal(data, &varPrincipalEntity)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = PrincipalEntity(varPrincipalEntity)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "ein")
|
|
delete(additionalProperties, "founders")
|
|
delete(additionalProperties, "imported")
|
|
delete(additionalProperties, "jurisdiction")
|
|
delete(additionalProperties, "name")
|
|
delete(additionalProperties, "stage")
|
|
delete(additionalProperties, "structure")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullablePrincipalEntity struct {
|
|
value *PrincipalEntity
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullablePrincipalEntity) Get() *PrincipalEntity {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullablePrincipalEntity) Set(val *PrincipalEntity) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullablePrincipalEntity) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullablePrincipalEntity) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullablePrincipalEntity(val *PrincipalEntity) *NullablePrincipalEntity {
|
|
return &NullablePrincipalEntity{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullablePrincipalEntity) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullablePrincipalEntity) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|