mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
535 lines
15 KiB
Go
535 lines
15 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 CaptableCaptableNote type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &CaptableCaptableNote{}
|
|
|
|
// CaptableCaptableNote struct for CaptableCaptableNote
|
|
type CaptableCaptableNote struct {
|
|
// Capital is the principal the investor lent.
|
|
Capital *float64 `json:"capital,omitempty"`
|
|
// ConversionCap is the valuation cap on conversion, if any.
|
|
ConversionCap *float64 `json:"conversionCap,omitempty"`
|
|
// DiscountRate is the discount to the next round's price, if any.
|
|
DiscountRate *float64 `json:"discountRate,omitempty"`
|
|
// ID is the note id.
|
|
Id *string `json:"id,omitempty"`
|
|
// InterestRate is the annual interest rate, if any.
|
|
InterestRate *float64 `json:"interestRate,omitempty"`
|
|
// IssueDate is the ISO date the note was signed.
|
|
IssueDate *string `json:"issueDate,omitempty"`
|
|
// PublicID is the note'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 note's state, e.g. DRAFT or ACTIVE.
|
|
Status *string `json:"status,omitempty"`
|
|
// Type is the instrument kind, e.g. NOTE.
|
|
Type *string `json:"type,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _CaptableCaptableNote CaptableCaptableNote
|
|
|
|
// NewCaptableCaptableNote instantiates a new CaptableCaptableNote 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 NewCaptableCaptableNote() *CaptableCaptableNote {
|
|
this := CaptableCaptableNote{}
|
|
return &this
|
|
}
|
|
|
|
// NewCaptableCaptableNoteWithDefaults instantiates a new CaptableCaptableNote 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 NewCaptableCaptableNoteWithDefaults() *CaptableCaptableNote {
|
|
this := CaptableCaptableNote{}
|
|
return &this
|
|
}
|
|
|
|
// GetCapital returns the Capital field value if set, zero value otherwise.
|
|
func (o *CaptableCaptableNote) 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 *CaptableCaptableNote) 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 *CaptableCaptableNote) 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 *CaptableCaptableNote) SetCapital(v float64) {
|
|
o.Capital = &v
|
|
}
|
|
|
|
// GetConversionCap returns the ConversionCap field value if set, zero value otherwise.
|
|
func (o *CaptableCaptableNote) GetConversionCap() float64 {
|
|
if o == nil || IsNil(o.ConversionCap) {
|
|
var ret float64
|
|
return ret
|
|
}
|
|
return *o.ConversionCap
|
|
}
|
|
|
|
// GetConversionCapOk returns a tuple with the ConversionCap field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *CaptableCaptableNote) GetConversionCapOk() (*float64, bool) {
|
|
if o == nil || IsNil(o.ConversionCap) {
|
|
return nil, false
|
|
}
|
|
return o.ConversionCap, true
|
|
}
|
|
|
|
// HasConversionCap returns a boolean if a field has been set.
|
|
func (o *CaptableCaptableNote) HasConversionCap() bool {
|
|
if o != nil && !IsNil(o.ConversionCap) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetConversionCap gets a reference to the given float64 and assigns it to the ConversionCap field.
|
|
func (o *CaptableCaptableNote) SetConversionCap(v float64) {
|
|
o.ConversionCap = &v
|
|
}
|
|
|
|
// GetDiscountRate returns the DiscountRate field value if set, zero value otherwise.
|
|
func (o *CaptableCaptableNote) 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 *CaptableCaptableNote) 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 *CaptableCaptableNote) 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 *CaptableCaptableNote) SetDiscountRate(v float64) {
|
|
o.DiscountRate = &v
|
|
}
|
|
|
|
// GetId returns the Id field value if set, zero value otherwise.
|
|
func (o *CaptableCaptableNote) 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 *CaptableCaptableNote) 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 *CaptableCaptableNote) 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 *CaptableCaptableNote) SetId(v string) {
|
|
o.Id = &v
|
|
}
|
|
|
|
// GetInterestRate returns the InterestRate field value if set, zero value otherwise.
|
|
func (o *CaptableCaptableNote) GetInterestRate() float64 {
|
|
if o == nil || IsNil(o.InterestRate) {
|
|
var ret float64
|
|
return ret
|
|
}
|
|
return *o.InterestRate
|
|
}
|
|
|
|
// GetInterestRateOk returns a tuple with the InterestRate field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *CaptableCaptableNote) GetInterestRateOk() (*float64, bool) {
|
|
if o == nil || IsNil(o.InterestRate) {
|
|
return nil, false
|
|
}
|
|
return o.InterestRate, true
|
|
}
|
|
|
|
// HasInterestRate returns a boolean if a field has been set.
|
|
func (o *CaptableCaptableNote) HasInterestRate() bool {
|
|
if o != nil && !IsNil(o.InterestRate) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetInterestRate gets a reference to the given float64 and assigns it to the InterestRate field.
|
|
func (o *CaptableCaptableNote) SetInterestRate(v float64) {
|
|
o.InterestRate = &v
|
|
}
|
|
|
|
// GetIssueDate returns the IssueDate field value if set, zero value otherwise.
|
|
func (o *CaptableCaptableNote) 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 *CaptableCaptableNote) 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 *CaptableCaptableNote) 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 *CaptableCaptableNote) SetIssueDate(v string) {
|
|
o.IssueDate = &v
|
|
}
|
|
|
|
// GetPublicId returns the PublicId field value if set, zero value otherwise.
|
|
func (o *CaptableCaptableNote) 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 *CaptableCaptableNote) 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 *CaptableCaptableNote) 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 *CaptableCaptableNote) SetPublicId(v string) {
|
|
o.PublicId = &v
|
|
}
|
|
|
|
// GetStakeholderId returns the StakeholderId field value if set, zero value otherwise.
|
|
func (o *CaptableCaptableNote) 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 *CaptableCaptableNote) 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 *CaptableCaptableNote) 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 *CaptableCaptableNote) SetStakeholderId(v string) {
|
|
o.StakeholderId = &v
|
|
}
|
|
|
|
// GetStakeholderName returns the StakeholderName field value if set, zero value otherwise.
|
|
func (o *CaptableCaptableNote) 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 *CaptableCaptableNote) 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 *CaptableCaptableNote) 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 *CaptableCaptableNote) SetStakeholderName(v string) {
|
|
o.StakeholderName = &v
|
|
}
|
|
|
|
// GetStatus returns the Status field value if set, zero value otherwise.
|
|
func (o *CaptableCaptableNote) 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 *CaptableCaptableNote) 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 *CaptableCaptableNote) 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 *CaptableCaptableNote) SetStatus(v string) {
|
|
o.Status = &v
|
|
}
|
|
|
|
// GetType returns the Type field value if set, zero value otherwise.
|
|
func (o *CaptableCaptableNote) 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 *CaptableCaptableNote) 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 *CaptableCaptableNote) 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 *CaptableCaptableNote) SetType(v string) {
|
|
o.Type = &v
|
|
}
|
|
|
|
func (o CaptableCaptableNote) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o CaptableCaptableNote) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Capital) {
|
|
toSerialize["capital"] = o.Capital
|
|
}
|
|
if !IsNil(o.ConversionCap) {
|
|
toSerialize["conversionCap"] = o.ConversionCap
|
|
}
|
|
if !IsNil(o.DiscountRate) {
|
|
toSerialize["discountRate"] = o.DiscountRate
|
|
}
|
|
if !IsNil(o.Id) {
|
|
toSerialize["id"] = o.Id
|
|
}
|
|
if !IsNil(o.InterestRate) {
|
|
toSerialize["interestRate"] = o.InterestRate
|
|
}
|
|
if !IsNil(o.IssueDate) {
|
|
toSerialize["issueDate"] = o.IssueDate
|
|
}
|
|
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
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *CaptableCaptableNote) UnmarshalJSON(data []byte) (err error) {
|
|
varCaptableCaptableNote := _CaptableCaptableNote{}
|
|
|
|
err = json.Unmarshal(data, &varCaptableCaptableNote)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = CaptableCaptableNote(varCaptableCaptableNote)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "capital")
|
|
delete(additionalProperties, "conversionCap")
|
|
delete(additionalProperties, "discountRate")
|
|
delete(additionalProperties, "id")
|
|
delete(additionalProperties, "interestRate")
|
|
delete(additionalProperties, "issueDate")
|
|
delete(additionalProperties, "publicId")
|
|
delete(additionalProperties, "stakeholderId")
|
|
delete(additionalProperties, "stakeholderName")
|
|
delete(additionalProperties, "status")
|
|
delete(additionalProperties, "type")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableCaptableCaptableNote struct {
|
|
value *CaptableCaptableNote
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableCaptableCaptableNote) Get() *CaptableCaptableNote {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableCaptableCaptableNote) Set(val *CaptableCaptableNote) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableCaptableCaptableNote) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableCaptableCaptableNote) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableCaptableCaptableNote(val *CaptableCaptableNote) *NullableCaptableCaptableNote {
|
|
return &NullableCaptableCaptableNote{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableCaptableCaptableNote) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableCaptableCaptableNote) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|