Files
sdk/model_captable_captable_holding.go

345 lines
9.8 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 CaptableCaptableHolding type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &CaptableCaptableHolding{}
// CaptableCaptableHolding struct for CaptableCaptableHolding
type CaptableCaptableHolding struct {
// FullyDiluted is shares plus options.
FullyDiluted *int64 `json:"fullyDiluted,omitempty"`
// Name is the stakeholder's name.
Name *string `json:"name,omitempty"`
// Options is the shares under this stakeholder's non-terminal option grants.
Options *int64 `json:"options,omitempty"`
// OwnershipPct is fullyDiluted as a percentage of the company's fullyDilutedShares, rounded to two decimals; 0 when nothing is issued.
OwnershipPct *float64 `json:"ownershipPct,omitempty"`
// Shares is the shares this stakeholder holds by certificate.
Shares *int64 `json:"shares,omitempty"`
// StakeholderID addresses the stakeholder these totals are for.
StakeholderId *string `json:"stakeholderId,omitempty"`
AdditionalProperties map[string]interface{}
}
type _CaptableCaptableHolding CaptableCaptableHolding
// NewCaptableCaptableHolding instantiates a new CaptableCaptableHolding 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 NewCaptableCaptableHolding() *CaptableCaptableHolding {
this := CaptableCaptableHolding{}
return &this
}
// NewCaptableCaptableHoldingWithDefaults instantiates a new CaptableCaptableHolding 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 NewCaptableCaptableHoldingWithDefaults() *CaptableCaptableHolding {
this := CaptableCaptableHolding{}
return &this
}
// GetFullyDiluted returns the FullyDiluted field value if set, zero value otherwise.
func (o *CaptableCaptableHolding) GetFullyDiluted() int64 {
if o == nil || IsNil(o.FullyDiluted) {
var ret int64
return ret
}
return *o.FullyDiluted
}
// GetFullyDilutedOk returns a tuple with the FullyDiluted field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CaptableCaptableHolding) GetFullyDilutedOk() (*int64, bool) {
if o == nil || IsNil(o.FullyDiluted) {
return nil, false
}
return o.FullyDiluted, true
}
// HasFullyDiluted returns a boolean if a field has been set.
func (o *CaptableCaptableHolding) HasFullyDiluted() bool {
if o != nil && !IsNil(o.FullyDiluted) {
return true
}
return false
}
// SetFullyDiluted gets a reference to the given int64 and assigns it to the FullyDiluted field.
func (o *CaptableCaptableHolding) SetFullyDiluted(v int64) {
o.FullyDiluted = &v
}
// GetName returns the Name field value if set, zero value otherwise.
func (o *CaptableCaptableHolding) 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 *CaptableCaptableHolding) 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 *CaptableCaptableHolding) 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 *CaptableCaptableHolding) SetName(v string) {
o.Name = &v
}
// GetOptions returns the Options field value if set, zero value otherwise.
func (o *CaptableCaptableHolding) GetOptions() int64 {
if o == nil || IsNil(o.Options) {
var ret int64
return ret
}
return *o.Options
}
// GetOptionsOk returns a tuple with the Options field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CaptableCaptableHolding) GetOptionsOk() (*int64, bool) {
if o == nil || IsNil(o.Options) {
return nil, false
}
return o.Options, true
}
// HasOptions returns a boolean if a field has been set.
func (o *CaptableCaptableHolding) HasOptions() bool {
if o != nil && !IsNil(o.Options) {
return true
}
return false
}
// SetOptions gets a reference to the given int64 and assigns it to the Options field.
func (o *CaptableCaptableHolding) SetOptions(v int64) {
o.Options = &v
}
// GetOwnershipPct returns the OwnershipPct field value if set, zero value otherwise.
func (o *CaptableCaptableHolding) GetOwnershipPct() float64 {
if o == nil || IsNil(o.OwnershipPct) {
var ret float64
return ret
}
return *o.OwnershipPct
}
// GetOwnershipPctOk returns a tuple with the OwnershipPct field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CaptableCaptableHolding) GetOwnershipPctOk() (*float64, bool) {
if o == nil || IsNil(o.OwnershipPct) {
return nil, false
}
return o.OwnershipPct, true
}
// HasOwnershipPct returns a boolean if a field has been set.
func (o *CaptableCaptableHolding) HasOwnershipPct() bool {
if o != nil && !IsNil(o.OwnershipPct) {
return true
}
return false
}
// SetOwnershipPct gets a reference to the given float64 and assigns it to the OwnershipPct field.
func (o *CaptableCaptableHolding) SetOwnershipPct(v float64) {
o.OwnershipPct = &v
}
// GetShares returns the Shares field value if set, zero value otherwise.
func (o *CaptableCaptableHolding) GetShares() int64 {
if o == nil || IsNil(o.Shares) {
var ret int64
return ret
}
return *o.Shares
}
// GetSharesOk returns a tuple with the Shares field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CaptableCaptableHolding) GetSharesOk() (*int64, bool) {
if o == nil || IsNil(o.Shares) {
return nil, false
}
return o.Shares, true
}
// HasShares returns a boolean if a field has been set.
func (o *CaptableCaptableHolding) HasShares() bool {
if o != nil && !IsNil(o.Shares) {
return true
}
return false
}
// SetShares gets a reference to the given int64 and assigns it to the Shares field.
func (o *CaptableCaptableHolding) SetShares(v int64) {
o.Shares = &v
}
// GetStakeholderId returns the StakeholderId field value if set, zero value otherwise.
func (o *CaptableCaptableHolding) GetStakeholderId() string {
if o == nil || IsNil(o.StakeholderId) {
var ret string
return ret
}
return *o.StakeholderId
}
// GetStakeholderIdOk returns a tuple with the StakeholderId field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CaptableCaptableHolding) GetStakeholderIdOk() (*string, bool) {
if o == nil || IsNil(o.StakeholderId) {
return nil, false
}
return o.StakeholderId, true
}
// HasStakeholderId returns a boolean if a field has been set.
func (o *CaptableCaptableHolding) HasStakeholderId() bool {
if o != nil && !IsNil(o.StakeholderId) {
return true
}
return false
}
// SetStakeholderId gets a reference to the given string and assigns it to the StakeholderId field.
func (o *CaptableCaptableHolding) SetStakeholderId(v string) {
o.StakeholderId = &v
}
func (o CaptableCaptableHolding) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o CaptableCaptableHolding) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.FullyDiluted) {
toSerialize["fullyDiluted"] = o.FullyDiluted
}
if !IsNil(o.Name) {
toSerialize["name"] = o.Name
}
if !IsNil(o.Options) {
toSerialize["options"] = o.Options
}
if !IsNil(o.OwnershipPct) {
toSerialize["ownershipPct"] = o.OwnershipPct
}
if !IsNil(o.Shares) {
toSerialize["shares"] = o.Shares
}
if !IsNil(o.StakeholderId) {
toSerialize["stakeholderId"] = o.StakeholderId
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *CaptableCaptableHolding) UnmarshalJSON(data []byte) (err error) {
varCaptableCaptableHolding := _CaptableCaptableHolding{}
err = json.Unmarshal(data, &varCaptableCaptableHolding)
if err != nil {
return err
}
*o = CaptableCaptableHolding(varCaptableCaptableHolding)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "fullyDiluted")
delete(additionalProperties, "name")
delete(additionalProperties, "options")
delete(additionalProperties, "ownershipPct")
delete(additionalProperties, "shares")
delete(additionalProperties, "stakeholderId")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableCaptableCaptableHolding struct {
value *CaptableCaptableHolding
isSet bool
}
func (v NullableCaptableCaptableHolding) Get() *CaptableCaptableHolding {
return v.value
}
func (v *NullableCaptableCaptableHolding) Set(val *CaptableCaptableHolding) {
v.value = val
v.isSet = true
}
func (v NullableCaptableCaptableHolding) IsSet() bool {
return v.isSet
}
func (v *NullableCaptableCaptableHolding) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableCaptableCaptableHolding(val *CaptableCaptableHolding) *NullableCaptableCaptableHolding {
return &NullableCaptableCaptableHolding{value: val, isSet: true}
}
func (v NullableCaptableCaptableHolding) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableCaptableCaptableHolding) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}