Files
sdk/model_captable_captable_summary.go

345 lines
11 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 CaptableCaptableSummary type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &CaptableCaptableSummary{}
// CaptableCaptableSummary struct for CaptableCaptableSummary
type CaptableCaptableSummary struct {
// ByShareClass is each share class's authorized-versus-issued position, in class creation order.
ByShareClass []CaptableCaptableClassHolding `json:"byShareClass,omitempty"`
// ByStakeholder is each stakeholder's position, largest holding first.
ByStakeholder []CaptableCaptableHolding `json:"byStakeholder,omitempty"`
// Company names the company the cap table is computed for.
Company *CaptableCaptableSummaryCompany `json:"company,omitempty"`
// Convertibles is the capital on SAFEs and notes that have not converted.
Convertibles *CaptableCaptableConvertibles `json:"convertibles,omitempty"`
// Rounds is the fundraising rollup.
Rounds *CaptableCaptableRoundTotals `json:"rounds,omitempty"`
// Totals is the company-wide share count.
Totals *CaptableCaptableTotals `json:"totals,omitempty"`
AdditionalProperties map[string]interface{}
}
type _CaptableCaptableSummary CaptableCaptableSummary
// NewCaptableCaptableSummary instantiates a new CaptableCaptableSummary 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 NewCaptableCaptableSummary() *CaptableCaptableSummary {
this := CaptableCaptableSummary{}
return &this
}
// NewCaptableCaptableSummaryWithDefaults instantiates a new CaptableCaptableSummary 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 NewCaptableCaptableSummaryWithDefaults() *CaptableCaptableSummary {
this := CaptableCaptableSummary{}
return &this
}
// GetByShareClass returns the ByShareClass field value if set, zero value otherwise.
func (o *CaptableCaptableSummary) GetByShareClass() []CaptableCaptableClassHolding {
if o == nil || IsNil(o.ByShareClass) {
var ret []CaptableCaptableClassHolding
return ret
}
return o.ByShareClass
}
// GetByShareClassOk returns a tuple with the ByShareClass field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CaptableCaptableSummary) GetByShareClassOk() ([]CaptableCaptableClassHolding, bool) {
if o == nil || IsNil(o.ByShareClass) {
return nil, false
}
return o.ByShareClass, true
}
// HasByShareClass returns a boolean if a field has been set.
func (o *CaptableCaptableSummary) HasByShareClass() bool {
if o != nil && !IsNil(o.ByShareClass) {
return true
}
return false
}
// SetByShareClass gets a reference to the given []CaptableCaptableClassHolding and assigns it to the ByShareClass field.
func (o *CaptableCaptableSummary) SetByShareClass(v []CaptableCaptableClassHolding) {
o.ByShareClass = v
}
// GetByStakeholder returns the ByStakeholder field value if set, zero value otherwise.
func (o *CaptableCaptableSummary) GetByStakeholder() []CaptableCaptableHolding {
if o == nil || IsNil(o.ByStakeholder) {
var ret []CaptableCaptableHolding
return ret
}
return o.ByStakeholder
}
// GetByStakeholderOk returns a tuple with the ByStakeholder field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CaptableCaptableSummary) GetByStakeholderOk() ([]CaptableCaptableHolding, bool) {
if o == nil || IsNil(o.ByStakeholder) {
return nil, false
}
return o.ByStakeholder, true
}
// HasByStakeholder returns a boolean if a field has been set.
func (o *CaptableCaptableSummary) HasByStakeholder() bool {
if o != nil && !IsNil(o.ByStakeholder) {
return true
}
return false
}
// SetByStakeholder gets a reference to the given []CaptableCaptableHolding and assigns it to the ByStakeholder field.
func (o *CaptableCaptableSummary) SetByStakeholder(v []CaptableCaptableHolding) {
o.ByStakeholder = v
}
// GetCompany returns the Company field value if set, zero value otherwise.
func (o *CaptableCaptableSummary) GetCompany() CaptableCaptableSummaryCompany {
if o == nil || IsNil(o.Company) {
var ret CaptableCaptableSummaryCompany
return ret
}
return *o.Company
}
// GetCompanyOk returns a tuple with the Company field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CaptableCaptableSummary) GetCompanyOk() (*CaptableCaptableSummaryCompany, bool) {
if o == nil || IsNil(o.Company) {
return nil, false
}
return o.Company, true
}
// HasCompany returns a boolean if a field has been set.
func (o *CaptableCaptableSummary) HasCompany() bool {
if o != nil && !IsNil(o.Company) {
return true
}
return false
}
// SetCompany gets a reference to the given CaptableCaptableSummaryCompany and assigns it to the Company field.
func (o *CaptableCaptableSummary) SetCompany(v CaptableCaptableSummaryCompany) {
o.Company = &v
}
// GetConvertibles returns the Convertibles field value if set, zero value otherwise.
func (o *CaptableCaptableSummary) GetConvertibles() CaptableCaptableConvertibles {
if o == nil || IsNil(o.Convertibles) {
var ret CaptableCaptableConvertibles
return ret
}
return *o.Convertibles
}
// GetConvertiblesOk returns a tuple with the Convertibles field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CaptableCaptableSummary) GetConvertiblesOk() (*CaptableCaptableConvertibles, bool) {
if o == nil || IsNil(o.Convertibles) {
return nil, false
}
return o.Convertibles, true
}
// HasConvertibles returns a boolean if a field has been set.
func (o *CaptableCaptableSummary) HasConvertibles() bool {
if o != nil && !IsNil(o.Convertibles) {
return true
}
return false
}
// SetConvertibles gets a reference to the given CaptableCaptableConvertibles and assigns it to the Convertibles field.
func (o *CaptableCaptableSummary) SetConvertibles(v CaptableCaptableConvertibles) {
o.Convertibles = &v
}
// GetRounds returns the Rounds field value if set, zero value otherwise.
func (o *CaptableCaptableSummary) GetRounds() CaptableCaptableRoundTotals {
if o == nil || IsNil(o.Rounds) {
var ret CaptableCaptableRoundTotals
return ret
}
return *o.Rounds
}
// GetRoundsOk returns a tuple with the Rounds field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CaptableCaptableSummary) GetRoundsOk() (*CaptableCaptableRoundTotals, bool) {
if o == nil || IsNil(o.Rounds) {
return nil, false
}
return o.Rounds, true
}
// HasRounds returns a boolean if a field has been set.
func (o *CaptableCaptableSummary) HasRounds() bool {
if o != nil && !IsNil(o.Rounds) {
return true
}
return false
}
// SetRounds gets a reference to the given CaptableCaptableRoundTotals and assigns it to the Rounds field.
func (o *CaptableCaptableSummary) SetRounds(v CaptableCaptableRoundTotals) {
o.Rounds = &v
}
// GetTotals returns the Totals field value if set, zero value otherwise.
func (o *CaptableCaptableSummary) GetTotals() CaptableCaptableTotals {
if o == nil || IsNil(o.Totals) {
var ret CaptableCaptableTotals
return ret
}
return *o.Totals
}
// GetTotalsOk returns a tuple with the Totals field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CaptableCaptableSummary) GetTotalsOk() (*CaptableCaptableTotals, bool) {
if o == nil || IsNil(o.Totals) {
return nil, false
}
return o.Totals, true
}
// HasTotals returns a boolean if a field has been set.
func (o *CaptableCaptableSummary) HasTotals() bool {
if o != nil && !IsNil(o.Totals) {
return true
}
return false
}
// SetTotals gets a reference to the given CaptableCaptableTotals and assigns it to the Totals field.
func (o *CaptableCaptableSummary) SetTotals(v CaptableCaptableTotals) {
o.Totals = &v
}
func (o CaptableCaptableSummary) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o CaptableCaptableSummary) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.ByShareClass) {
toSerialize["byShareClass"] = o.ByShareClass
}
if !IsNil(o.ByStakeholder) {
toSerialize["byStakeholder"] = o.ByStakeholder
}
if !IsNil(o.Company) {
toSerialize["company"] = o.Company
}
if !IsNil(o.Convertibles) {
toSerialize["convertibles"] = o.Convertibles
}
if !IsNil(o.Rounds) {
toSerialize["rounds"] = o.Rounds
}
if !IsNil(o.Totals) {
toSerialize["totals"] = o.Totals
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *CaptableCaptableSummary) UnmarshalJSON(data []byte) (err error) {
varCaptableCaptableSummary := _CaptableCaptableSummary{}
err = json.Unmarshal(data, &varCaptableCaptableSummary)
if err != nil {
return err
}
*o = CaptableCaptableSummary(varCaptableCaptableSummary)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "byShareClass")
delete(additionalProperties, "byStakeholder")
delete(additionalProperties, "company")
delete(additionalProperties, "convertibles")
delete(additionalProperties, "rounds")
delete(additionalProperties, "totals")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableCaptableCaptableSummary struct {
value *CaptableCaptableSummary
isSet bool
}
func (v NullableCaptableCaptableSummary) Get() *CaptableCaptableSummary {
return v.value
}
func (v *NullableCaptableCaptableSummary) Set(val *CaptableCaptableSummary) {
v.value = val
v.isSet = true
}
func (v NullableCaptableCaptableSummary) IsSet() bool {
return v.isSet
}
func (v *NullableCaptableCaptableSummary) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableCaptableCaptableSummary(val *CaptableCaptableSummary) *NullableCaptableCaptableSummary {
return &NullableCaptableCaptableSummary{value: val, isSet: true}
}
func (v NullableCaptableCaptableSummary) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableCaptableCaptableSummary) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}