Files
sdk/model_captable_captable_convertibles.go

193 lines
5.7 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 CaptableCaptableConvertibles type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &CaptableCaptableConvertibles{}
// CaptableCaptableConvertibles struct for CaptableCaptableConvertibles
type CaptableCaptableConvertibles struct {
// Notes is the convertible notes total.
Notes *CaptableCaptableInstrumentTotal `json:"notes,omitempty"`
// Safes is the SAFEs total.
Safes *CaptableCaptableInstrumentTotal `json:"safes,omitempty"`
AdditionalProperties map[string]interface{}
}
type _CaptableCaptableConvertibles CaptableCaptableConvertibles
// NewCaptableCaptableConvertibles instantiates a new CaptableCaptableConvertibles 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 NewCaptableCaptableConvertibles() *CaptableCaptableConvertibles {
this := CaptableCaptableConvertibles{}
return &this
}
// NewCaptableCaptableConvertiblesWithDefaults instantiates a new CaptableCaptableConvertibles 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 NewCaptableCaptableConvertiblesWithDefaults() *CaptableCaptableConvertibles {
this := CaptableCaptableConvertibles{}
return &this
}
// GetNotes returns the Notes field value if set, zero value otherwise.
func (o *CaptableCaptableConvertibles) GetNotes() CaptableCaptableInstrumentTotal {
if o == nil || IsNil(o.Notes) {
var ret CaptableCaptableInstrumentTotal
return ret
}
return *o.Notes
}
// GetNotesOk returns a tuple with the Notes field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CaptableCaptableConvertibles) GetNotesOk() (*CaptableCaptableInstrumentTotal, bool) {
if o == nil || IsNil(o.Notes) {
return nil, false
}
return o.Notes, true
}
// HasNotes returns a boolean if a field has been set.
func (o *CaptableCaptableConvertibles) HasNotes() bool {
if o != nil && !IsNil(o.Notes) {
return true
}
return false
}
// SetNotes gets a reference to the given CaptableCaptableInstrumentTotal and assigns it to the Notes field.
func (o *CaptableCaptableConvertibles) SetNotes(v CaptableCaptableInstrumentTotal) {
o.Notes = &v
}
// GetSafes returns the Safes field value if set, zero value otherwise.
func (o *CaptableCaptableConvertibles) GetSafes() CaptableCaptableInstrumentTotal {
if o == nil || IsNil(o.Safes) {
var ret CaptableCaptableInstrumentTotal
return ret
}
return *o.Safes
}
// GetSafesOk returns a tuple with the Safes field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CaptableCaptableConvertibles) GetSafesOk() (*CaptableCaptableInstrumentTotal, bool) {
if o == nil || IsNil(o.Safes) {
return nil, false
}
return o.Safes, true
}
// HasSafes returns a boolean if a field has been set.
func (o *CaptableCaptableConvertibles) HasSafes() bool {
if o != nil && !IsNil(o.Safes) {
return true
}
return false
}
// SetSafes gets a reference to the given CaptableCaptableInstrumentTotal and assigns it to the Safes field.
func (o *CaptableCaptableConvertibles) SetSafes(v CaptableCaptableInstrumentTotal) {
o.Safes = &v
}
func (o CaptableCaptableConvertibles) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o CaptableCaptableConvertibles) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Notes) {
toSerialize["notes"] = o.Notes
}
if !IsNil(o.Safes) {
toSerialize["safes"] = o.Safes
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *CaptableCaptableConvertibles) UnmarshalJSON(data []byte) (err error) {
varCaptableCaptableConvertibles := _CaptableCaptableConvertibles{}
err = json.Unmarshal(data, &varCaptableCaptableConvertibles)
if err != nil {
return err
}
*o = CaptableCaptableConvertibles(varCaptableCaptableConvertibles)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "notes")
delete(additionalProperties, "safes")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableCaptableCaptableConvertibles struct {
value *CaptableCaptableConvertibles
isSet bool
}
func (v NullableCaptableCaptableConvertibles) Get() *CaptableCaptableConvertibles {
return v.value
}
func (v *NullableCaptableCaptableConvertibles) Set(val *CaptableCaptableConvertibles) {
v.value = val
v.isSet = true
}
func (v NullableCaptableCaptableConvertibles) IsSet() bool {
return v.isSet
}
func (v *NullableCaptableCaptableConvertibles) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableCaptableCaptableConvertibles(val *CaptableCaptableConvertibles) *NullableCaptableCaptableConvertibles {
return &NullableCaptableCaptableConvertibles{value: val, isSet: true}
}
func (v NullableCaptableCaptableConvertibles) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableCaptableCaptableConvertibles) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}