Files
sdk/model_captable_captable_share_class.go

649 lines
20 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 CaptableCaptableShareClass type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &CaptableCaptableShareClass{}
// CaptableCaptableShareClass struct for CaptableCaptableShareClass
type CaptableCaptableShareClass struct {
// ClassType is COMMON or PREFERRED.
ClassType *string `json:"classType,omitempty"`
// CompanyName is the name of the company whose cap table this is.
CompanyName *string `json:"companyName,omitempty"`
// ConversionRights describes what the class converts into, e.g. CONVERTS_TO_FUTURE_ROUND.
ConversionRights *string `json:"conversionRights,omitempty"`
// ID is the share class id.
Id *string `json:"id,omitempty"`
// Idx is the class's 1-based position within the company, in creation order.
Idx *int64 `json:"idx,omitempty"`
// InitialSharesAuthorized is how many shares of this class are authorized.
InitialSharesAuthorized *int64 `json:"initialSharesAuthorized,omitempty"`
// LiquidationPreferenceMultiple is the preference multiple on liquidation.
LiquidationPreferenceMultiple *float64 `json:"liquidationPreferenceMultiple,omitempty"`
// Name is the class name, e.g. \"Common\" or \"Series A Preferred\".
Name *string `json:"name,omitempty"`
// ParValue is the par value per share.
ParValue *float64 `json:"parValue,omitempty"`
// ParticipationCapMultiple caps participation on liquidation; 0 is uncapped.
ParticipationCapMultiple *float64 `json:"participationCapMultiple,omitempty"`
// Prefix is the certificate prefix, CS for common and PS for preferred.
Prefix *string `json:"prefix,omitempty"`
// PricePerShare is the issue price per share.
PricePerShare *float64 `json:"pricePerShare,omitempty"`
// Seniority orders classes in a liquidation waterfall; higher is more senior.
Seniority *int64 `json:"seniority,omitempty"`
// VotesPerShare is how many votes one share of this class carries.
VotesPerShare *int64 `json:"votesPerShare,omitempty"`
AdditionalProperties map[string]interface{}
}
type _CaptableCaptableShareClass CaptableCaptableShareClass
// NewCaptableCaptableShareClass instantiates a new CaptableCaptableShareClass 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 NewCaptableCaptableShareClass() *CaptableCaptableShareClass {
this := CaptableCaptableShareClass{}
return &this
}
// NewCaptableCaptableShareClassWithDefaults instantiates a new CaptableCaptableShareClass 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 NewCaptableCaptableShareClassWithDefaults() *CaptableCaptableShareClass {
this := CaptableCaptableShareClass{}
return &this
}
// GetClassType returns the ClassType field value if set, zero value otherwise.
func (o *CaptableCaptableShareClass) GetClassType() string {
if o == nil || IsNil(o.ClassType) {
var ret string
return ret
}
return *o.ClassType
}
// GetClassTypeOk returns a tuple with the ClassType field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CaptableCaptableShareClass) GetClassTypeOk() (*string, bool) {
if o == nil || IsNil(o.ClassType) {
return nil, false
}
return o.ClassType, true
}
// HasClassType returns a boolean if a field has been set.
func (o *CaptableCaptableShareClass) HasClassType() bool {
if o != nil && !IsNil(o.ClassType) {
return true
}
return false
}
// SetClassType gets a reference to the given string and assigns it to the ClassType field.
func (o *CaptableCaptableShareClass) SetClassType(v string) {
o.ClassType = &v
}
// GetCompanyName returns the CompanyName field value if set, zero value otherwise.
func (o *CaptableCaptableShareClass) GetCompanyName() string {
if o == nil || IsNil(o.CompanyName) {
var ret string
return ret
}
return *o.CompanyName
}
// GetCompanyNameOk returns a tuple with the CompanyName field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CaptableCaptableShareClass) GetCompanyNameOk() (*string, bool) {
if o == nil || IsNil(o.CompanyName) {
return nil, false
}
return o.CompanyName, true
}
// HasCompanyName returns a boolean if a field has been set.
func (o *CaptableCaptableShareClass) HasCompanyName() bool {
if o != nil && !IsNil(o.CompanyName) {
return true
}
return false
}
// SetCompanyName gets a reference to the given string and assigns it to the CompanyName field.
func (o *CaptableCaptableShareClass) SetCompanyName(v string) {
o.CompanyName = &v
}
// GetConversionRights returns the ConversionRights field value if set, zero value otherwise.
func (o *CaptableCaptableShareClass) GetConversionRights() string {
if o == nil || IsNil(o.ConversionRights) {
var ret string
return ret
}
return *o.ConversionRights
}
// GetConversionRightsOk returns a tuple with the ConversionRights field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CaptableCaptableShareClass) GetConversionRightsOk() (*string, bool) {
if o == nil || IsNil(o.ConversionRights) {
return nil, false
}
return o.ConversionRights, true
}
// HasConversionRights returns a boolean if a field has been set.
func (o *CaptableCaptableShareClass) HasConversionRights() bool {
if o != nil && !IsNil(o.ConversionRights) {
return true
}
return false
}
// SetConversionRights gets a reference to the given string and assigns it to the ConversionRights field.
func (o *CaptableCaptableShareClass) SetConversionRights(v string) {
o.ConversionRights = &v
}
// GetId returns the Id field value if set, zero value otherwise.
func (o *CaptableCaptableShareClass) 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 *CaptableCaptableShareClass) 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 *CaptableCaptableShareClass) 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 *CaptableCaptableShareClass) SetId(v string) {
o.Id = &v
}
// GetIdx returns the Idx field value if set, zero value otherwise.
func (o *CaptableCaptableShareClass) GetIdx() int64 {
if o == nil || IsNil(o.Idx) {
var ret int64
return ret
}
return *o.Idx
}
// GetIdxOk returns a tuple with the Idx field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CaptableCaptableShareClass) GetIdxOk() (*int64, bool) {
if o == nil || IsNil(o.Idx) {
return nil, false
}
return o.Idx, true
}
// HasIdx returns a boolean if a field has been set.
func (o *CaptableCaptableShareClass) HasIdx() bool {
if o != nil && !IsNil(o.Idx) {
return true
}
return false
}
// SetIdx gets a reference to the given int64 and assigns it to the Idx field.
func (o *CaptableCaptableShareClass) SetIdx(v int64) {
o.Idx = &v
}
// GetInitialSharesAuthorized returns the InitialSharesAuthorized field value if set, zero value otherwise.
func (o *CaptableCaptableShareClass) GetInitialSharesAuthorized() int64 {
if o == nil || IsNil(o.InitialSharesAuthorized) {
var ret int64
return ret
}
return *o.InitialSharesAuthorized
}
// GetInitialSharesAuthorizedOk returns a tuple with the InitialSharesAuthorized field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CaptableCaptableShareClass) GetInitialSharesAuthorizedOk() (*int64, bool) {
if o == nil || IsNil(o.InitialSharesAuthorized) {
return nil, false
}
return o.InitialSharesAuthorized, true
}
// HasInitialSharesAuthorized returns a boolean if a field has been set.
func (o *CaptableCaptableShareClass) HasInitialSharesAuthorized() bool {
if o != nil && !IsNil(o.InitialSharesAuthorized) {
return true
}
return false
}
// SetInitialSharesAuthorized gets a reference to the given int64 and assigns it to the InitialSharesAuthorized field.
func (o *CaptableCaptableShareClass) SetInitialSharesAuthorized(v int64) {
o.InitialSharesAuthorized = &v
}
// GetLiquidationPreferenceMultiple returns the LiquidationPreferenceMultiple field value if set, zero value otherwise.
func (o *CaptableCaptableShareClass) GetLiquidationPreferenceMultiple() float64 {
if o == nil || IsNil(o.LiquidationPreferenceMultiple) {
var ret float64
return ret
}
return *o.LiquidationPreferenceMultiple
}
// GetLiquidationPreferenceMultipleOk returns a tuple with the LiquidationPreferenceMultiple field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CaptableCaptableShareClass) GetLiquidationPreferenceMultipleOk() (*float64, bool) {
if o == nil || IsNil(o.LiquidationPreferenceMultiple) {
return nil, false
}
return o.LiquidationPreferenceMultiple, true
}
// HasLiquidationPreferenceMultiple returns a boolean if a field has been set.
func (o *CaptableCaptableShareClass) HasLiquidationPreferenceMultiple() bool {
if o != nil && !IsNil(o.LiquidationPreferenceMultiple) {
return true
}
return false
}
// SetLiquidationPreferenceMultiple gets a reference to the given float64 and assigns it to the LiquidationPreferenceMultiple field.
func (o *CaptableCaptableShareClass) SetLiquidationPreferenceMultiple(v float64) {
o.LiquidationPreferenceMultiple = &v
}
// GetName returns the Name field value if set, zero value otherwise.
func (o *CaptableCaptableShareClass) 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 *CaptableCaptableShareClass) 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 *CaptableCaptableShareClass) 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 *CaptableCaptableShareClass) SetName(v string) {
o.Name = &v
}
// GetParValue returns the ParValue field value if set, zero value otherwise.
func (o *CaptableCaptableShareClass) GetParValue() float64 {
if o == nil || IsNil(o.ParValue) {
var ret float64
return ret
}
return *o.ParValue
}
// GetParValueOk returns a tuple with the ParValue field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CaptableCaptableShareClass) GetParValueOk() (*float64, bool) {
if o == nil || IsNil(o.ParValue) {
return nil, false
}
return o.ParValue, true
}
// HasParValue returns a boolean if a field has been set.
func (o *CaptableCaptableShareClass) HasParValue() bool {
if o != nil && !IsNil(o.ParValue) {
return true
}
return false
}
// SetParValue gets a reference to the given float64 and assigns it to the ParValue field.
func (o *CaptableCaptableShareClass) SetParValue(v float64) {
o.ParValue = &v
}
// GetParticipationCapMultiple returns the ParticipationCapMultiple field value if set, zero value otherwise.
func (o *CaptableCaptableShareClass) GetParticipationCapMultiple() float64 {
if o == nil || IsNil(o.ParticipationCapMultiple) {
var ret float64
return ret
}
return *o.ParticipationCapMultiple
}
// GetParticipationCapMultipleOk returns a tuple with the ParticipationCapMultiple field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CaptableCaptableShareClass) GetParticipationCapMultipleOk() (*float64, bool) {
if o == nil || IsNil(o.ParticipationCapMultiple) {
return nil, false
}
return o.ParticipationCapMultiple, true
}
// HasParticipationCapMultiple returns a boolean if a field has been set.
func (o *CaptableCaptableShareClass) HasParticipationCapMultiple() bool {
if o != nil && !IsNil(o.ParticipationCapMultiple) {
return true
}
return false
}
// SetParticipationCapMultiple gets a reference to the given float64 and assigns it to the ParticipationCapMultiple field.
func (o *CaptableCaptableShareClass) SetParticipationCapMultiple(v float64) {
o.ParticipationCapMultiple = &v
}
// GetPrefix returns the Prefix field value if set, zero value otherwise.
func (o *CaptableCaptableShareClass) GetPrefix() string {
if o == nil || IsNil(o.Prefix) {
var ret string
return ret
}
return *o.Prefix
}
// GetPrefixOk returns a tuple with the Prefix field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CaptableCaptableShareClass) GetPrefixOk() (*string, bool) {
if o == nil || IsNil(o.Prefix) {
return nil, false
}
return o.Prefix, true
}
// HasPrefix returns a boolean if a field has been set.
func (o *CaptableCaptableShareClass) HasPrefix() bool {
if o != nil && !IsNil(o.Prefix) {
return true
}
return false
}
// SetPrefix gets a reference to the given string and assigns it to the Prefix field.
func (o *CaptableCaptableShareClass) SetPrefix(v string) {
o.Prefix = &v
}
// GetPricePerShare returns the PricePerShare field value if set, zero value otherwise.
func (o *CaptableCaptableShareClass) GetPricePerShare() float64 {
if o == nil || IsNil(o.PricePerShare) {
var ret float64
return ret
}
return *o.PricePerShare
}
// GetPricePerShareOk returns a tuple with the PricePerShare field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CaptableCaptableShareClass) GetPricePerShareOk() (*float64, bool) {
if o == nil || IsNil(o.PricePerShare) {
return nil, false
}
return o.PricePerShare, true
}
// HasPricePerShare returns a boolean if a field has been set.
func (o *CaptableCaptableShareClass) HasPricePerShare() bool {
if o != nil && !IsNil(o.PricePerShare) {
return true
}
return false
}
// SetPricePerShare gets a reference to the given float64 and assigns it to the PricePerShare field.
func (o *CaptableCaptableShareClass) SetPricePerShare(v float64) {
o.PricePerShare = &v
}
// GetSeniority returns the Seniority field value if set, zero value otherwise.
func (o *CaptableCaptableShareClass) GetSeniority() int64 {
if o == nil || IsNil(o.Seniority) {
var ret int64
return ret
}
return *o.Seniority
}
// GetSeniorityOk returns a tuple with the Seniority field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CaptableCaptableShareClass) GetSeniorityOk() (*int64, bool) {
if o == nil || IsNil(o.Seniority) {
return nil, false
}
return o.Seniority, true
}
// HasSeniority returns a boolean if a field has been set.
func (o *CaptableCaptableShareClass) HasSeniority() bool {
if o != nil && !IsNil(o.Seniority) {
return true
}
return false
}
// SetSeniority gets a reference to the given int64 and assigns it to the Seniority field.
func (o *CaptableCaptableShareClass) SetSeniority(v int64) {
o.Seniority = &v
}
// GetVotesPerShare returns the VotesPerShare field value if set, zero value otherwise.
func (o *CaptableCaptableShareClass) GetVotesPerShare() int64 {
if o == nil || IsNil(o.VotesPerShare) {
var ret int64
return ret
}
return *o.VotesPerShare
}
// GetVotesPerShareOk returns a tuple with the VotesPerShare field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CaptableCaptableShareClass) GetVotesPerShareOk() (*int64, bool) {
if o == nil || IsNil(o.VotesPerShare) {
return nil, false
}
return o.VotesPerShare, true
}
// HasVotesPerShare returns a boolean if a field has been set.
func (o *CaptableCaptableShareClass) HasVotesPerShare() bool {
if o != nil && !IsNil(o.VotesPerShare) {
return true
}
return false
}
// SetVotesPerShare gets a reference to the given int64 and assigns it to the VotesPerShare field.
func (o *CaptableCaptableShareClass) SetVotesPerShare(v int64) {
o.VotesPerShare = &v
}
func (o CaptableCaptableShareClass) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o CaptableCaptableShareClass) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.ClassType) {
toSerialize["classType"] = o.ClassType
}
if !IsNil(o.CompanyName) {
toSerialize["companyName"] = o.CompanyName
}
if !IsNil(o.ConversionRights) {
toSerialize["conversionRights"] = o.ConversionRights
}
if !IsNil(o.Id) {
toSerialize["id"] = o.Id
}
if !IsNil(o.Idx) {
toSerialize["idx"] = o.Idx
}
if !IsNil(o.InitialSharesAuthorized) {
toSerialize["initialSharesAuthorized"] = o.InitialSharesAuthorized
}
if !IsNil(o.LiquidationPreferenceMultiple) {
toSerialize["liquidationPreferenceMultiple"] = o.LiquidationPreferenceMultiple
}
if !IsNil(o.Name) {
toSerialize["name"] = o.Name
}
if !IsNil(o.ParValue) {
toSerialize["parValue"] = o.ParValue
}
if !IsNil(o.ParticipationCapMultiple) {
toSerialize["participationCapMultiple"] = o.ParticipationCapMultiple
}
if !IsNil(o.Prefix) {
toSerialize["prefix"] = o.Prefix
}
if !IsNil(o.PricePerShare) {
toSerialize["pricePerShare"] = o.PricePerShare
}
if !IsNil(o.Seniority) {
toSerialize["seniority"] = o.Seniority
}
if !IsNil(o.VotesPerShare) {
toSerialize["votesPerShare"] = o.VotesPerShare
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *CaptableCaptableShareClass) UnmarshalJSON(data []byte) (err error) {
varCaptableCaptableShareClass := _CaptableCaptableShareClass{}
err = json.Unmarshal(data, &varCaptableCaptableShareClass)
if err != nil {
return err
}
*o = CaptableCaptableShareClass(varCaptableCaptableShareClass)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "classType")
delete(additionalProperties, "companyName")
delete(additionalProperties, "conversionRights")
delete(additionalProperties, "id")
delete(additionalProperties, "idx")
delete(additionalProperties, "initialSharesAuthorized")
delete(additionalProperties, "liquidationPreferenceMultiple")
delete(additionalProperties, "name")
delete(additionalProperties, "parValue")
delete(additionalProperties, "participationCapMultiple")
delete(additionalProperties, "prefix")
delete(additionalProperties, "pricePerShare")
delete(additionalProperties, "seniority")
delete(additionalProperties, "votesPerShare")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableCaptableCaptableShareClass struct {
value *CaptableCaptableShareClass
isSet bool
}
func (v NullableCaptableCaptableShareClass) Get() *CaptableCaptableShareClass {
return v.value
}
func (v *NullableCaptableCaptableShareClass) Set(val *CaptableCaptableShareClass) {
v.value = val
v.isSet = true
}
func (v NullableCaptableCaptableShareClass) IsSet() bool {
return v.isSet
}
func (v *NullableCaptableCaptableShareClass) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableCaptableCaptableShareClass(val *CaptableCaptableShareClass) *NullableCaptableCaptableShareClass {
return &NullableCaptableCaptableShareClass{value: val, isSet: true}
}
func (v NullableCaptableCaptableShareClass) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableCaptableCaptableShareClass) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}