mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
421 lines
12 KiB
Go
421 lines
12 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 CaptableCaptableInvestment type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &CaptableCaptableInvestment{}
|
|
|
|
// CaptableCaptableInvestment struct for CaptableCaptableInvestment
|
|
type CaptableCaptableInvestment struct {
|
|
// Amount is the cash invested.
|
|
Amount *float64 `json:"amount,omitempty"`
|
|
// Date is the ISO date of the investment.
|
|
Date *string `json:"date,omitempty"`
|
|
// ID is the investment id.
|
|
Id *string `json:"id,omitempty"`
|
|
// RoundID is the round the cheque went into.
|
|
RoundId *string `json:"roundId,omitempty"`
|
|
// ShareClassID is the class shares were issued in, for a priced round.
|
|
ShareClassId *string `json:"shareClassId,omitempty"`
|
|
// Shares is how many shares the investment bought; 0 when the round issues no equity at the time of investment.
|
|
Shares *int64 `json:"shares,omitempty"`
|
|
// StakeholderID is the investor.
|
|
StakeholderId *string `json:"stakeholderId,omitempty"`
|
|
// StakeholderName is that investor's name.
|
|
StakeholderName *string `json:"stakeholderName,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _CaptableCaptableInvestment CaptableCaptableInvestment
|
|
|
|
// NewCaptableCaptableInvestment instantiates a new CaptableCaptableInvestment 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 NewCaptableCaptableInvestment() *CaptableCaptableInvestment {
|
|
this := CaptableCaptableInvestment{}
|
|
return &this
|
|
}
|
|
|
|
// NewCaptableCaptableInvestmentWithDefaults instantiates a new CaptableCaptableInvestment 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 NewCaptableCaptableInvestmentWithDefaults() *CaptableCaptableInvestment {
|
|
this := CaptableCaptableInvestment{}
|
|
return &this
|
|
}
|
|
|
|
// GetAmount returns the Amount field value if set, zero value otherwise.
|
|
func (o *CaptableCaptableInvestment) GetAmount() float64 {
|
|
if o == nil || IsNil(o.Amount) {
|
|
var ret float64
|
|
return ret
|
|
}
|
|
return *o.Amount
|
|
}
|
|
|
|
// GetAmountOk returns a tuple with the Amount field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *CaptableCaptableInvestment) GetAmountOk() (*float64, bool) {
|
|
if o == nil || IsNil(o.Amount) {
|
|
return nil, false
|
|
}
|
|
return o.Amount, true
|
|
}
|
|
|
|
// HasAmount returns a boolean if a field has been set.
|
|
func (o *CaptableCaptableInvestment) HasAmount() bool {
|
|
if o != nil && !IsNil(o.Amount) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetAmount gets a reference to the given float64 and assigns it to the Amount field.
|
|
func (o *CaptableCaptableInvestment) SetAmount(v float64) {
|
|
o.Amount = &v
|
|
}
|
|
|
|
// GetDate returns the Date field value if set, zero value otherwise.
|
|
func (o *CaptableCaptableInvestment) GetDate() string {
|
|
if o == nil || IsNil(o.Date) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Date
|
|
}
|
|
|
|
// GetDateOk returns a tuple with the Date field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *CaptableCaptableInvestment) GetDateOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Date) {
|
|
return nil, false
|
|
}
|
|
return o.Date, true
|
|
}
|
|
|
|
// HasDate returns a boolean if a field has been set.
|
|
func (o *CaptableCaptableInvestment) HasDate() bool {
|
|
if o != nil && !IsNil(o.Date) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetDate gets a reference to the given string and assigns it to the Date field.
|
|
func (o *CaptableCaptableInvestment) SetDate(v string) {
|
|
o.Date = &v
|
|
}
|
|
|
|
// GetId returns the Id field value if set, zero value otherwise.
|
|
func (o *CaptableCaptableInvestment) 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 *CaptableCaptableInvestment) 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 *CaptableCaptableInvestment) 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 *CaptableCaptableInvestment) SetId(v string) {
|
|
o.Id = &v
|
|
}
|
|
|
|
// GetRoundId returns the RoundId field value if set, zero value otherwise.
|
|
func (o *CaptableCaptableInvestment) GetRoundId() string {
|
|
if o == nil || IsNil(o.RoundId) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.RoundId
|
|
}
|
|
|
|
// GetRoundIdOk returns a tuple with the RoundId field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *CaptableCaptableInvestment) GetRoundIdOk() (*string, bool) {
|
|
if o == nil || IsNil(o.RoundId) {
|
|
return nil, false
|
|
}
|
|
return o.RoundId, true
|
|
}
|
|
|
|
// HasRoundId returns a boolean if a field has been set.
|
|
func (o *CaptableCaptableInvestment) HasRoundId() bool {
|
|
if o != nil && !IsNil(o.RoundId) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetRoundId gets a reference to the given string and assigns it to the RoundId field.
|
|
func (o *CaptableCaptableInvestment) SetRoundId(v string) {
|
|
o.RoundId = &v
|
|
}
|
|
|
|
// GetShareClassId returns the ShareClassId field value if set, zero value otherwise.
|
|
func (o *CaptableCaptableInvestment) GetShareClassId() string {
|
|
if o == nil || IsNil(o.ShareClassId) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.ShareClassId
|
|
}
|
|
|
|
// GetShareClassIdOk returns a tuple with the ShareClassId field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *CaptableCaptableInvestment) GetShareClassIdOk() (*string, bool) {
|
|
if o == nil || IsNil(o.ShareClassId) {
|
|
return nil, false
|
|
}
|
|
return o.ShareClassId, true
|
|
}
|
|
|
|
// HasShareClassId returns a boolean if a field has been set.
|
|
func (o *CaptableCaptableInvestment) HasShareClassId() bool {
|
|
if o != nil && !IsNil(o.ShareClassId) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetShareClassId gets a reference to the given string and assigns it to the ShareClassId field.
|
|
func (o *CaptableCaptableInvestment) SetShareClassId(v string) {
|
|
o.ShareClassId = &v
|
|
}
|
|
|
|
// GetShares returns the Shares field value if set, zero value otherwise.
|
|
func (o *CaptableCaptableInvestment) 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 *CaptableCaptableInvestment) 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 *CaptableCaptableInvestment) 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 *CaptableCaptableInvestment) SetShares(v int64) {
|
|
o.Shares = &v
|
|
}
|
|
|
|
// GetStakeholderId returns the StakeholderId field value if set, zero value otherwise.
|
|
func (o *CaptableCaptableInvestment) 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 *CaptableCaptableInvestment) 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 *CaptableCaptableInvestment) 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 *CaptableCaptableInvestment) SetStakeholderId(v string) {
|
|
o.StakeholderId = &v
|
|
}
|
|
|
|
// GetStakeholderName returns the StakeholderName field value if set, zero value otherwise.
|
|
func (o *CaptableCaptableInvestment) 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 *CaptableCaptableInvestment) 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 *CaptableCaptableInvestment) 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 *CaptableCaptableInvestment) SetStakeholderName(v string) {
|
|
o.StakeholderName = &v
|
|
}
|
|
|
|
func (o CaptableCaptableInvestment) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o CaptableCaptableInvestment) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Amount) {
|
|
toSerialize["amount"] = o.Amount
|
|
}
|
|
if !IsNil(o.Date) {
|
|
toSerialize["date"] = o.Date
|
|
}
|
|
if !IsNil(o.Id) {
|
|
toSerialize["id"] = o.Id
|
|
}
|
|
if !IsNil(o.RoundId) {
|
|
toSerialize["roundId"] = o.RoundId
|
|
}
|
|
if !IsNil(o.ShareClassId) {
|
|
toSerialize["shareClassId"] = o.ShareClassId
|
|
}
|
|
if !IsNil(o.Shares) {
|
|
toSerialize["shares"] = o.Shares
|
|
}
|
|
if !IsNil(o.StakeholderId) {
|
|
toSerialize["stakeholderId"] = o.StakeholderId
|
|
}
|
|
if !IsNil(o.StakeholderName) {
|
|
toSerialize["stakeholderName"] = o.StakeholderName
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *CaptableCaptableInvestment) UnmarshalJSON(data []byte) (err error) {
|
|
varCaptableCaptableInvestment := _CaptableCaptableInvestment{}
|
|
|
|
err = json.Unmarshal(data, &varCaptableCaptableInvestment)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = CaptableCaptableInvestment(varCaptableCaptableInvestment)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "amount")
|
|
delete(additionalProperties, "date")
|
|
delete(additionalProperties, "id")
|
|
delete(additionalProperties, "roundId")
|
|
delete(additionalProperties, "shareClassId")
|
|
delete(additionalProperties, "shares")
|
|
delete(additionalProperties, "stakeholderId")
|
|
delete(additionalProperties, "stakeholderName")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableCaptableCaptableInvestment struct {
|
|
value *CaptableCaptableInvestment
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableCaptableCaptableInvestment) Get() *CaptableCaptableInvestment {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableCaptableCaptableInvestment) Set(val *CaptableCaptableInvestment) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableCaptableCaptableInvestment) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableCaptableCaptableInvestment) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableCaptableCaptableInvestment(val *CaptableCaptableInvestment) *NullableCaptableCaptableInvestment {
|
|
return &NullableCaptableCaptableInvestment{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableCaptableCaptableInvestment) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableCaptableCaptableInvestment) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|