mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
193 lines
5.5 KiB
Go
193 lines
5.5 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 CaptableCaptableRoundTotals type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &CaptableCaptableRoundTotals{}
|
|
|
|
// CaptableCaptableRoundTotals struct for CaptableCaptableRoundTotals
|
|
type CaptableCaptableRoundTotals struct {
|
|
// Count is how many rounds the company has recorded.
|
|
Count *int64 `json:"count,omitempty"`
|
|
// TotalRaised is the sum of every round's raised amount.
|
|
TotalRaised *float64 `json:"totalRaised,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _CaptableCaptableRoundTotals CaptableCaptableRoundTotals
|
|
|
|
// NewCaptableCaptableRoundTotals instantiates a new CaptableCaptableRoundTotals 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 NewCaptableCaptableRoundTotals() *CaptableCaptableRoundTotals {
|
|
this := CaptableCaptableRoundTotals{}
|
|
return &this
|
|
}
|
|
|
|
// NewCaptableCaptableRoundTotalsWithDefaults instantiates a new CaptableCaptableRoundTotals 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 NewCaptableCaptableRoundTotalsWithDefaults() *CaptableCaptableRoundTotals {
|
|
this := CaptableCaptableRoundTotals{}
|
|
return &this
|
|
}
|
|
|
|
// GetCount returns the Count field value if set, zero value otherwise.
|
|
func (o *CaptableCaptableRoundTotals) 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 *CaptableCaptableRoundTotals) 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 *CaptableCaptableRoundTotals) 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 *CaptableCaptableRoundTotals) SetCount(v int64) {
|
|
o.Count = &v
|
|
}
|
|
|
|
// GetTotalRaised returns the TotalRaised field value if set, zero value otherwise.
|
|
func (o *CaptableCaptableRoundTotals) GetTotalRaised() float64 {
|
|
if o == nil || IsNil(o.TotalRaised) {
|
|
var ret float64
|
|
return ret
|
|
}
|
|
return *o.TotalRaised
|
|
}
|
|
|
|
// GetTotalRaisedOk returns a tuple with the TotalRaised field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *CaptableCaptableRoundTotals) GetTotalRaisedOk() (*float64, bool) {
|
|
if o == nil || IsNil(o.TotalRaised) {
|
|
return nil, false
|
|
}
|
|
return o.TotalRaised, true
|
|
}
|
|
|
|
// HasTotalRaised returns a boolean if a field has been set.
|
|
func (o *CaptableCaptableRoundTotals) HasTotalRaised() bool {
|
|
if o != nil && !IsNil(o.TotalRaised) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetTotalRaised gets a reference to the given float64 and assigns it to the TotalRaised field.
|
|
func (o *CaptableCaptableRoundTotals) SetTotalRaised(v float64) {
|
|
o.TotalRaised = &v
|
|
}
|
|
|
|
func (o CaptableCaptableRoundTotals) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o CaptableCaptableRoundTotals) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Count) {
|
|
toSerialize["count"] = o.Count
|
|
}
|
|
if !IsNil(o.TotalRaised) {
|
|
toSerialize["totalRaised"] = o.TotalRaised
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *CaptableCaptableRoundTotals) UnmarshalJSON(data []byte) (err error) {
|
|
varCaptableCaptableRoundTotals := _CaptableCaptableRoundTotals{}
|
|
|
|
err = json.Unmarshal(data, &varCaptableCaptableRoundTotals)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = CaptableCaptableRoundTotals(varCaptableCaptableRoundTotals)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "count")
|
|
delete(additionalProperties, "totalRaised")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableCaptableCaptableRoundTotals struct {
|
|
value *CaptableCaptableRoundTotals
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableCaptableCaptableRoundTotals) Get() *CaptableCaptableRoundTotals {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableCaptableCaptableRoundTotals) Set(val *CaptableCaptableRoundTotals) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableCaptableCaptableRoundTotals) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableCaptableCaptableRoundTotals) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableCaptableCaptableRoundTotals(val *CaptableCaptableRoundTotals) *NullableCaptableCaptableRoundTotals {
|
|
return &NullableCaptableCaptableRoundTotals{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableCaptableCaptableRoundTotals) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableCaptableCaptableRoundTotals) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|