Files
sdk/model_captable_captable_round_detail.go

193 lines
5.9 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 CaptableCaptableRoundDetail type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &CaptableCaptableRoundDetail{}
// CaptableCaptableRoundDetail struct for CaptableCaptableRoundDetail
type CaptableCaptableRoundDetail struct {
// Investments is every investment into this round, oldest first.
Investments []CaptableCaptableRoundInvestment `json:"investments,omitempty"`
// Round is the round's own terms — name, type, valuation, target and status — as against the investments beside it.
Round *CaptableCaptableRound `json:"round,omitempty"`
AdditionalProperties map[string]interface{}
}
type _CaptableCaptableRoundDetail CaptableCaptableRoundDetail
// NewCaptableCaptableRoundDetail instantiates a new CaptableCaptableRoundDetail 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 NewCaptableCaptableRoundDetail() *CaptableCaptableRoundDetail {
this := CaptableCaptableRoundDetail{}
return &this
}
// NewCaptableCaptableRoundDetailWithDefaults instantiates a new CaptableCaptableRoundDetail 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 NewCaptableCaptableRoundDetailWithDefaults() *CaptableCaptableRoundDetail {
this := CaptableCaptableRoundDetail{}
return &this
}
// GetInvestments returns the Investments field value if set, zero value otherwise.
func (o *CaptableCaptableRoundDetail) GetInvestments() []CaptableCaptableRoundInvestment {
if o == nil || IsNil(o.Investments) {
var ret []CaptableCaptableRoundInvestment
return ret
}
return o.Investments
}
// GetInvestmentsOk returns a tuple with the Investments field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CaptableCaptableRoundDetail) GetInvestmentsOk() ([]CaptableCaptableRoundInvestment, bool) {
if o == nil || IsNil(o.Investments) {
return nil, false
}
return o.Investments, true
}
// HasInvestments returns a boolean if a field has been set.
func (o *CaptableCaptableRoundDetail) HasInvestments() bool {
if o != nil && !IsNil(o.Investments) {
return true
}
return false
}
// SetInvestments gets a reference to the given []CaptableCaptableRoundInvestment and assigns it to the Investments field.
func (o *CaptableCaptableRoundDetail) SetInvestments(v []CaptableCaptableRoundInvestment) {
o.Investments = v
}
// GetRound returns the Round field value if set, zero value otherwise.
func (o *CaptableCaptableRoundDetail) GetRound() CaptableCaptableRound {
if o == nil || IsNil(o.Round) {
var ret CaptableCaptableRound
return ret
}
return *o.Round
}
// GetRoundOk returns a tuple with the Round field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CaptableCaptableRoundDetail) GetRoundOk() (*CaptableCaptableRound, bool) {
if o == nil || IsNil(o.Round) {
return nil, false
}
return o.Round, true
}
// HasRound returns a boolean if a field has been set.
func (o *CaptableCaptableRoundDetail) HasRound() bool {
if o != nil && !IsNil(o.Round) {
return true
}
return false
}
// SetRound gets a reference to the given CaptableCaptableRound and assigns it to the Round field.
func (o *CaptableCaptableRoundDetail) SetRound(v CaptableCaptableRound) {
o.Round = &v
}
func (o CaptableCaptableRoundDetail) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o CaptableCaptableRoundDetail) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Investments) {
toSerialize["investments"] = o.Investments
}
if !IsNil(o.Round) {
toSerialize["round"] = o.Round
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *CaptableCaptableRoundDetail) UnmarshalJSON(data []byte) (err error) {
varCaptableCaptableRoundDetail := _CaptableCaptableRoundDetail{}
err = json.Unmarshal(data, &varCaptableCaptableRoundDetail)
if err != nil {
return err
}
*o = CaptableCaptableRoundDetail(varCaptableCaptableRoundDetail)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "investments")
delete(additionalProperties, "round")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableCaptableCaptableRoundDetail struct {
value *CaptableCaptableRoundDetail
isSet bool
}
func (v NullableCaptableCaptableRoundDetail) Get() *CaptableCaptableRoundDetail {
return v.value
}
func (v *NullableCaptableCaptableRoundDetail) Set(val *CaptableCaptableRoundDetail) {
v.value = val
v.isSet = true
}
func (v NullableCaptableCaptableRoundDetail) IsSet() bool {
return v.isSet
}
func (v *NullableCaptableCaptableRoundDetail) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableCaptableCaptableRoundDetail(val *CaptableCaptableRoundDetail) *NullableCaptableCaptableRoundDetail {
return &NullableCaptableCaptableRoundDetail{value: val, isSet: true}
}
func (v NullableCaptableCaptableRoundDetail) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableCaptableCaptableRoundDetail) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}