mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
307 lines
8.8 KiB
Go
307 lines
8.8 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 CaptableCaptableClassHolding type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &CaptableCaptableClassHolding{}
|
|
|
|
// CaptableCaptableClassHolding struct for CaptableCaptableClassHolding
|
|
type CaptableCaptableClassHolding struct {
|
|
// Authorized is how many shares of the class are authorized.
|
|
Authorized *int64 `json:"authorized,omitempty"`
|
|
// ClassType is COMMON or PREFERRED.
|
|
ClassType *string `json:"classType,omitempty"`
|
|
// Issued is how many shares of the class have been issued.
|
|
Issued *int64 `json:"issued,omitempty"`
|
|
// Name is the class name.
|
|
Name *string `json:"name,omitempty"`
|
|
// ShareClassID addresses the class this position is for.
|
|
ShareClassId *string `json:"shareClassId,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _CaptableCaptableClassHolding CaptableCaptableClassHolding
|
|
|
|
// NewCaptableCaptableClassHolding instantiates a new CaptableCaptableClassHolding 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 NewCaptableCaptableClassHolding() *CaptableCaptableClassHolding {
|
|
this := CaptableCaptableClassHolding{}
|
|
return &this
|
|
}
|
|
|
|
// NewCaptableCaptableClassHoldingWithDefaults instantiates a new CaptableCaptableClassHolding 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 NewCaptableCaptableClassHoldingWithDefaults() *CaptableCaptableClassHolding {
|
|
this := CaptableCaptableClassHolding{}
|
|
return &this
|
|
}
|
|
|
|
// GetAuthorized returns the Authorized field value if set, zero value otherwise.
|
|
func (o *CaptableCaptableClassHolding) GetAuthorized() int64 {
|
|
if o == nil || IsNil(o.Authorized) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.Authorized
|
|
}
|
|
|
|
// GetAuthorizedOk returns a tuple with the Authorized field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *CaptableCaptableClassHolding) GetAuthorizedOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.Authorized) {
|
|
return nil, false
|
|
}
|
|
return o.Authorized, true
|
|
}
|
|
|
|
// HasAuthorized returns a boolean if a field has been set.
|
|
func (o *CaptableCaptableClassHolding) HasAuthorized() bool {
|
|
if o != nil && !IsNil(o.Authorized) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetAuthorized gets a reference to the given int64 and assigns it to the Authorized field.
|
|
func (o *CaptableCaptableClassHolding) SetAuthorized(v int64) {
|
|
o.Authorized = &v
|
|
}
|
|
|
|
// GetClassType returns the ClassType field value if set, zero value otherwise.
|
|
func (o *CaptableCaptableClassHolding) GetClassType() string {
|
|
if o == nil || IsNil(o.ClassType) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.ClassType
|
|
}
|
|
|
|
// GetClassTypeOk returns a tuple with the ClassType field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *CaptableCaptableClassHolding) GetClassTypeOk() (*string, bool) {
|
|
if o == nil || IsNil(o.ClassType) {
|
|
return nil, false
|
|
}
|
|
return o.ClassType, true
|
|
}
|
|
|
|
// HasClassType returns a boolean if a field has been set.
|
|
func (o *CaptableCaptableClassHolding) HasClassType() bool {
|
|
if o != nil && !IsNil(o.ClassType) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetClassType gets a reference to the given string and assigns it to the ClassType field.
|
|
func (o *CaptableCaptableClassHolding) SetClassType(v string) {
|
|
o.ClassType = &v
|
|
}
|
|
|
|
// GetIssued returns the Issued field value if set, zero value otherwise.
|
|
func (o *CaptableCaptableClassHolding) GetIssued() int64 {
|
|
if o == nil || IsNil(o.Issued) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.Issued
|
|
}
|
|
|
|
// GetIssuedOk returns a tuple with the Issued field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *CaptableCaptableClassHolding) GetIssuedOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.Issued) {
|
|
return nil, false
|
|
}
|
|
return o.Issued, true
|
|
}
|
|
|
|
// HasIssued returns a boolean if a field has been set.
|
|
func (o *CaptableCaptableClassHolding) HasIssued() bool {
|
|
if o != nil && !IsNil(o.Issued) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetIssued gets a reference to the given int64 and assigns it to the Issued field.
|
|
func (o *CaptableCaptableClassHolding) SetIssued(v int64) {
|
|
o.Issued = &v
|
|
}
|
|
|
|
// GetName returns the Name field value if set, zero value otherwise.
|
|
func (o *CaptableCaptableClassHolding) GetName() string {
|
|
if o == nil || IsNil(o.Name) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Name
|
|
}
|
|
|
|
// GetNameOk returns a tuple with the Name field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *CaptableCaptableClassHolding) GetNameOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Name) {
|
|
return nil, false
|
|
}
|
|
return o.Name, true
|
|
}
|
|
|
|
// HasName returns a boolean if a field has been set.
|
|
func (o *CaptableCaptableClassHolding) HasName() bool {
|
|
if o != nil && !IsNil(o.Name) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetName gets a reference to the given string and assigns it to the Name field.
|
|
func (o *CaptableCaptableClassHolding) SetName(v string) {
|
|
o.Name = &v
|
|
}
|
|
|
|
// GetShareClassId returns the ShareClassId field value if set, zero value otherwise.
|
|
func (o *CaptableCaptableClassHolding) 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 *CaptableCaptableClassHolding) 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 *CaptableCaptableClassHolding) 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 *CaptableCaptableClassHolding) SetShareClassId(v string) {
|
|
o.ShareClassId = &v
|
|
}
|
|
|
|
func (o CaptableCaptableClassHolding) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o CaptableCaptableClassHolding) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Authorized) {
|
|
toSerialize["authorized"] = o.Authorized
|
|
}
|
|
if !IsNil(o.ClassType) {
|
|
toSerialize["classType"] = o.ClassType
|
|
}
|
|
if !IsNil(o.Issued) {
|
|
toSerialize["issued"] = o.Issued
|
|
}
|
|
if !IsNil(o.Name) {
|
|
toSerialize["name"] = o.Name
|
|
}
|
|
if !IsNil(o.ShareClassId) {
|
|
toSerialize["shareClassId"] = o.ShareClassId
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *CaptableCaptableClassHolding) UnmarshalJSON(data []byte) (err error) {
|
|
varCaptableCaptableClassHolding := _CaptableCaptableClassHolding{}
|
|
|
|
err = json.Unmarshal(data, &varCaptableCaptableClassHolding)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = CaptableCaptableClassHolding(varCaptableCaptableClassHolding)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "authorized")
|
|
delete(additionalProperties, "classType")
|
|
delete(additionalProperties, "issued")
|
|
delete(additionalProperties, "name")
|
|
delete(additionalProperties, "shareClassId")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableCaptableCaptableClassHolding struct {
|
|
value *CaptableCaptableClassHolding
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableCaptableCaptableClassHolding) Get() *CaptableCaptableClassHolding {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableCaptableCaptableClassHolding) Set(val *CaptableCaptableClassHolding) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableCaptableCaptableClassHolding) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableCaptableCaptableClassHolding) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableCaptableCaptableClassHolding(val *CaptableCaptableClassHolding) *NullableCaptableCaptableClassHolding {
|
|
return &NullableCaptableCaptableClassHolding{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableCaptableCaptableClassHolding) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableCaptableCaptableClassHolding) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|