Files
sdk/model_captable_captable_instrument_total.go

193 lines
5.6 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 CaptableCaptableInstrumentTotal type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &CaptableCaptableInstrumentTotal{}
// CaptableCaptableInstrumentTotal struct for CaptableCaptableInstrumentTotal
type CaptableCaptableInstrumentTotal struct {
// Capital is the total capital across those instruments.
Capital *float64 `json:"capital,omitempty"`
// Count is how many instruments there are.
Count *int64 `json:"count,omitempty"`
AdditionalProperties map[string]interface{}
}
type _CaptableCaptableInstrumentTotal CaptableCaptableInstrumentTotal
// NewCaptableCaptableInstrumentTotal instantiates a new CaptableCaptableInstrumentTotal 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 NewCaptableCaptableInstrumentTotal() *CaptableCaptableInstrumentTotal {
this := CaptableCaptableInstrumentTotal{}
return &this
}
// NewCaptableCaptableInstrumentTotalWithDefaults instantiates a new CaptableCaptableInstrumentTotal 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 NewCaptableCaptableInstrumentTotalWithDefaults() *CaptableCaptableInstrumentTotal {
this := CaptableCaptableInstrumentTotal{}
return &this
}
// GetCapital returns the Capital field value if set, zero value otherwise.
func (o *CaptableCaptableInstrumentTotal) 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 *CaptableCaptableInstrumentTotal) 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 *CaptableCaptableInstrumentTotal) 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 *CaptableCaptableInstrumentTotal) SetCapital(v float64) {
o.Capital = &v
}
// GetCount returns the Count field value if set, zero value otherwise.
func (o *CaptableCaptableInstrumentTotal) GetCount() int64 {
if o == nil || IsNil(o.Count) {
var ret int64
return ret
}
return *o.Count
}
// GetCountOk returns a tuple with the Count field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CaptableCaptableInstrumentTotal) GetCountOk() (*int64, bool) {
if o == nil || IsNil(o.Count) {
return nil, false
}
return o.Count, true
}
// HasCount returns a boolean if a field has been set.
func (o *CaptableCaptableInstrumentTotal) HasCount() bool {
if o != nil && !IsNil(o.Count) {
return true
}
return false
}
// SetCount gets a reference to the given int64 and assigns it to the Count field.
func (o *CaptableCaptableInstrumentTotal) SetCount(v int64) {
o.Count = &v
}
func (o CaptableCaptableInstrumentTotal) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o CaptableCaptableInstrumentTotal) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Capital) {
toSerialize["capital"] = o.Capital
}
if !IsNil(o.Count) {
toSerialize["count"] = o.Count
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *CaptableCaptableInstrumentTotal) UnmarshalJSON(data []byte) (err error) {
varCaptableCaptableInstrumentTotal := _CaptableCaptableInstrumentTotal{}
err = json.Unmarshal(data, &varCaptableCaptableInstrumentTotal)
if err != nil {
return err
}
*o = CaptableCaptableInstrumentTotal(varCaptableCaptableInstrumentTotal)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "capital")
delete(additionalProperties, "count")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableCaptableCaptableInstrumentTotal struct {
value *CaptableCaptableInstrumentTotal
isSet bool
}
func (v NullableCaptableCaptableInstrumentTotal) Get() *CaptableCaptableInstrumentTotal {
return v.value
}
func (v *NullableCaptableCaptableInstrumentTotal) Set(val *CaptableCaptableInstrumentTotal) {
v.value = val
v.isSet = true
}
func (v NullableCaptableCaptableInstrumentTotal) IsSet() bool {
return v.isSet
}
func (v *NullableCaptableCaptableInstrumentTotal) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableCaptableCaptableInstrumentTotal(val *CaptableCaptableInstrumentTotal) *NullableCaptableCaptableInstrumentTotal {
return &NullableCaptableCaptableInstrumentTotal{value: val, isSet: true}
}
func (v NullableCaptableCaptableInstrumentTotal) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableCaptableCaptableInstrumentTotal) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}