Files
sdk/model_captable_captable_safe.go

573 lines
16 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 CaptableCaptableSafe type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &CaptableCaptableSafe{}
// CaptableCaptableSafe struct for CaptableCaptableSafe
type CaptableCaptableSafe struct {
// Capital is the cash the investor put in.
Capital *float64 `json:"capital,omitempty"`
// DiscountRate is the discount to the next round's price, if any.
DiscountRate *float64 `json:"discountRate,omitempty"`
// ID is the SAFE id.
Id *string `json:"id,omitempty"`
// IssueDate is the ISO date the SAFE was signed.
IssueDate *string `json:"issueDate,omitempty"`
// MFN is true when the SAFE carries a most-favoured-nation clause.
Mfn *bool `json:"mfn,omitempty"`
// ProRata is true when the SAFE carries pro-rata rights.
ProRata *bool `json:"proRata,omitempty"`
// PublicID is the SAFE's shareable identifier, unique within the company.
PublicId *string `json:"publicId,omitempty"`
// StakeholderID is the investor.
StakeholderId *string `json:"stakeholderId,omitempty"`
// StakeholderName is that investor's name.
StakeholderName *string `json:"stakeholderName,omitempty"`
// Status is the SAFE's state, e.g. DRAFT or ACTIVE.
Status *string `json:"status,omitempty"`
// Type is POST_MONEY or PRE_MONEY.
Type *string `json:"type,omitempty"`
// ValuationCap is the valuation cap, if any.
ValuationCap *float64 `json:"valuationCap,omitempty"`
AdditionalProperties map[string]interface{}
}
type _CaptableCaptableSafe CaptableCaptableSafe
// NewCaptableCaptableSafe instantiates a new CaptableCaptableSafe 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 NewCaptableCaptableSafe() *CaptableCaptableSafe {
this := CaptableCaptableSafe{}
return &this
}
// NewCaptableCaptableSafeWithDefaults instantiates a new CaptableCaptableSafe 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 NewCaptableCaptableSafeWithDefaults() *CaptableCaptableSafe {
this := CaptableCaptableSafe{}
return &this
}
// GetCapital returns the Capital field value if set, zero value otherwise.
func (o *CaptableCaptableSafe) GetCapital() float64 {
if o == nil || IsNil(o.Capital) {
var ret float64
return ret
}
return *o.Capital
}
// GetCapitalOk returns a tuple with the Capital field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CaptableCaptableSafe) GetCapitalOk() (*float64, bool) {
if o == nil || IsNil(o.Capital) {
return nil, false
}
return o.Capital, true
}
// HasCapital returns a boolean if a field has been set.
func (o *CaptableCaptableSafe) HasCapital() bool {
if o != nil && !IsNil(o.Capital) {
return true
}
return false
}
// SetCapital gets a reference to the given float64 and assigns it to the Capital field.
func (o *CaptableCaptableSafe) SetCapital(v float64) {
o.Capital = &v
}
// GetDiscountRate returns the DiscountRate field value if set, zero value otherwise.
func (o *CaptableCaptableSafe) GetDiscountRate() float64 {
if o == nil || IsNil(o.DiscountRate) {
var ret float64
return ret
}
return *o.DiscountRate
}
// GetDiscountRateOk returns a tuple with the DiscountRate field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CaptableCaptableSafe) GetDiscountRateOk() (*float64, bool) {
if o == nil || IsNil(o.DiscountRate) {
return nil, false
}
return o.DiscountRate, true
}
// HasDiscountRate returns a boolean if a field has been set.
func (o *CaptableCaptableSafe) HasDiscountRate() bool {
if o != nil && !IsNil(o.DiscountRate) {
return true
}
return false
}
// SetDiscountRate gets a reference to the given float64 and assigns it to the DiscountRate field.
func (o *CaptableCaptableSafe) SetDiscountRate(v float64) {
o.DiscountRate = &v
}
// GetId returns the Id field value if set, zero value otherwise.
func (o *CaptableCaptableSafe) 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 *CaptableCaptableSafe) 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 *CaptableCaptableSafe) 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 *CaptableCaptableSafe) SetId(v string) {
o.Id = &v
}
// GetIssueDate returns the IssueDate field value if set, zero value otherwise.
func (o *CaptableCaptableSafe) GetIssueDate() string {
if o == nil || IsNil(o.IssueDate) {
var ret string
return ret
}
return *o.IssueDate
}
// GetIssueDateOk returns a tuple with the IssueDate field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CaptableCaptableSafe) GetIssueDateOk() (*string, bool) {
if o == nil || IsNil(o.IssueDate) {
return nil, false
}
return o.IssueDate, true
}
// HasIssueDate returns a boolean if a field has been set.
func (o *CaptableCaptableSafe) HasIssueDate() bool {
if o != nil && !IsNil(o.IssueDate) {
return true
}
return false
}
// SetIssueDate gets a reference to the given string and assigns it to the IssueDate field.
func (o *CaptableCaptableSafe) SetIssueDate(v string) {
o.IssueDate = &v
}
// GetMfn returns the Mfn field value if set, zero value otherwise.
func (o *CaptableCaptableSafe) GetMfn() bool {
if o == nil || IsNil(o.Mfn) {
var ret bool
return ret
}
return *o.Mfn
}
// GetMfnOk returns a tuple with the Mfn field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CaptableCaptableSafe) GetMfnOk() (*bool, bool) {
if o == nil || IsNil(o.Mfn) {
return nil, false
}
return o.Mfn, true
}
// HasMfn returns a boolean if a field has been set.
func (o *CaptableCaptableSafe) HasMfn() bool {
if o != nil && !IsNil(o.Mfn) {
return true
}
return false
}
// SetMfn gets a reference to the given bool and assigns it to the Mfn field.
func (o *CaptableCaptableSafe) SetMfn(v bool) {
o.Mfn = &v
}
// GetProRata returns the ProRata field value if set, zero value otherwise.
func (o *CaptableCaptableSafe) GetProRata() bool {
if o == nil || IsNil(o.ProRata) {
var ret bool
return ret
}
return *o.ProRata
}
// GetProRataOk returns a tuple with the ProRata field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CaptableCaptableSafe) GetProRataOk() (*bool, bool) {
if o == nil || IsNil(o.ProRata) {
return nil, false
}
return o.ProRata, true
}
// HasProRata returns a boolean if a field has been set.
func (o *CaptableCaptableSafe) HasProRata() bool {
if o != nil && !IsNil(o.ProRata) {
return true
}
return false
}
// SetProRata gets a reference to the given bool and assigns it to the ProRata field.
func (o *CaptableCaptableSafe) SetProRata(v bool) {
o.ProRata = &v
}
// GetPublicId returns the PublicId field value if set, zero value otherwise.
func (o *CaptableCaptableSafe) GetPublicId() string {
if o == nil || IsNil(o.PublicId) {
var ret string
return ret
}
return *o.PublicId
}
// GetPublicIdOk returns a tuple with the PublicId field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CaptableCaptableSafe) GetPublicIdOk() (*string, bool) {
if o == nil || IsNil(o.PublicId) {
return nil, false
}
return o.PublicId, true
}
// HasPublicId returns a boolean if a field has been set.
func (o *CaptableCaptableSafe) HasPublicId() bool {
if o != nil && !IsNil(o.PublicId) {
return true
}
return false
}
// SetPublicId gets a reference to the given string and assigns it to the PublicId field.
func (o *CaptableCaptableSafe) SetPublicId(v string) {
o.PublicId = &v
}
// GetStakeholderId returns the StakeholderId field value if set, zero value otherwise.
func (o *CaptableCaptableSafe) 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 *CaptableCaptableSafe) 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 *CaptableCaptableSafe) 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 *CaptableCaptableSafe) SetStakeholderId(v string) {
o.StakeholderId = &v
}
// GetStakeholderName returns the StakeholderName field value if set, zero value otherwise.
func (o *CaptableCaptableSafe) GetStakeholderName() string {
if o == nil || IsNil(o.StakeholderName) {
var ret string
return ret
}
return *o.StakeholderName
}
// GetStakeholderNameOk returns a tuple with the StakeholderName field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CaptableCaptableSafe) GetStakeholderNameOk() (*string, bool) {
if o == nil || IsNil(o.StakeholderName) {
return nil, false
}
return o.StakeholderName, true
}
// HasStakeholderName returns a boolean if a field has been set.
func (o *CaptableCaptableSafe) HasStakeholderName() bool {
if o != nil && !IsNil(o.StakeholderName) {
return true
}
return false
}
// SetStakeholderName gets a reference to the given string and assigns it to the StakeholderName field.
func (o *CaptableCaptableSafe) SetStakeholderName(v string) {
o.StakeholderName = &v
}
// GetStatus returns the Status field value if set, zero value otherwise.
func (o *CaptableCaptableSafe) GetStatus() string {
if o == nil || IsNil(o.Status) {
var ret string
return ret
}
return *o.Status
}
// GetStatusOk returns a tuple with the Status field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CaptableCaptableSafe) GetStatusOk() (*string, bool) {
if o == nil || IsNil(o.Status) {
return nil, false
}
return o.Status, true
}
// HasStatus returns a boolean if a field has been set.
func (o *CaptableCaptableSafe) HasStatus() bool {
if o != nil && !IsNil(o.Status) {
return true
}
return false
}
// SetStatus gets a reference to the given string and assigns it to the Status field.
func (o *CaptableCaptableSafe) SetStatus(v string) {
o.Status = &v
}
// GetType returns the Type field value if set, zero value otherwise.
func (o *CaptableCaptableSafe) GetType() string {
if o == nil || IsNil(o.Type) {
var ret string
return ret
}
return *o.Type
}
// GetTypeOk returns a tuple with the Type field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CaptableCaptableSafe) GetTypeOk() (*string, bool) {
if o == nil || IsNil(o.Type) {
return nil, false
}
return o.Type, true
}
// HasType returns a boolean if a field has been set.
func (o *CaptableCaptableSafe) HasType() bool {
if o != nil && !IsNil(o.Type) {
return true
}
return false
}
// SetType gets a reference to the given string and assigns it to the Type field.
func (o *CaptableCaptableSafe) SetType(v string) {
o.Type = &v
}
// GetValuationCap returns the ValuationCap field value if set, zero value otherwise.
func (o *CaptableCaptableSafe) GetValuationCap() float64 {
if o == nil || IsNil(o.ValuationCap) {
var ret float64
return ret
}
return *o.ValuationCap
}
// GetValuationCapOk returns a tuple with the ValuationCap field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CaptableCaptableSafe) GetValuationCapOk() (*float64, bool) {
if o == nil || IsNil(o.ValuationCap) {
return nil, false
}
return o.ValuationCap, true
}
// HasValuationCap returns a boolean if a field has been set.
func (o *CaptableCaptableSafe) HasValuationCap() bool {
if o != nil && !IsNil(o.ValuationCap) {
return true
}
return false
}
// SetValuationCap gets a reference to the given float64 and assigns it to the ValuationCap field.
func (o *CaptableCaptableSafe) SetValuationCap(v float64) {
o.ValuationCap = &v
}
func (o CaptableCaptableSafe) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o CaptableCaptableSafe) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Capital) {
toSerialize["capital"] = o.Capital
}
if !IsNil(o.DiscountRate) {
toSerialize["discountRate"] = o.DiscountRate
}
if !IsNil(o.Id) {
toSerialize["id"] = o.Id
}
if !IsNil(o.IssueDate) {
toSerialize["issueDate"] = o.IssueDate
}
if !IsNil(o.Mfn) {
toSerialize["mfn"] = o.Mfn
}
if !IsNil(o.ProRata) {
toSerialize["proRata"] = o.ProRata
}
if !IsNil(o.PublicId) {
toSerialize["publicId"] = o.PublicId
}
if !IsNil(o.StakeholderId) {
toSerialize["stakeholderId"] = o.StakeholderId
}
if !IsNil(o.StakeholderName) {
toSerialize["stakeholderName"] = o.StakeholderName
}
if !IsNil(o.Status) {
toSerialize["status"] = o.Status
}
if !IsNil(o.Type) {
toSerialize["type"] = o.Type
}
if !IsNil(o.ValuationCap) {
toSerialize["valuationCap"] = o.ValuationCap
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *CaptableCaptableSafe) UnmarshalJSON(data []byte) (err error) {
varCaptableCaptableSafe := _CaptableCaptableSafe{}
err = json.Unmarshal(data, &varCaptableCaptableSafe)
if err != nil {
return err
}
*o = CaptableCaptableSafe(varCaptableCaptableSafe)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "capital")
delete(additionalProperties, "discountRate")
delete(additionalProperties, "id")
delete(additionalProperties, "issueDate")
delete(additionalProperties, "mfn")
delete(additionalProperties, "proRata")
delete(additionalProperties, "publicId")
delete(additionalProperties, "stakeholderId")
delete(additionalProperties, "stakeholderName")
delete(additionalProperties, "status")
delete(additionalProperties, "type")
delete(additionalProperties, "valuationCap")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableCaptableCaptableSafe struct {
value *CaptableCaptableSafe
isSet bool
}
func (v NullableCaptableCaptableSafe) Get() *CaptableCaptableSafe {
return v.value
}
func (v *NullableCaptableCaptableSafe) Set(val *CaptableCaptableSafe) {
v.value = val
v.isSet = true
}
func (v NullableCaptableCaptableSafe) IsSet() bool {
return v.isSet
}
func (v *NullableCaptableCaptableSafe) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableCaptableCaptableSafe(val *CaptableCaptableSafe) *NullableCaptableCaptableSafe {
return &NullableCaptableCaptableSafe{value: val, isSet: true}
}
func (v NullableCaptableCaptableSafe) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableCaptableCaptableSafe) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}