mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
228 lines
5.4 KiB
Go
228 lines
5.4 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 FormTally type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &FormTally{}
|
|
|
|
// FormTally struct for FormTally
|
|
type FormTally struct {
|
|
Count *int64 `json:"count,omitempty"`
|
|
Label *string `json:"label,omitempty"`
|
|
Value *string `json:"value,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _FormTally FormTally
|
|
|
|
// NewFormTally instantiates a new FormTally 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 NewFormTally() *FormTally {
|
|
this := FormTally{}
|
|
return &this
|
|
}
|
|
|
|
// NewFormTallyWithDefaults instantiates a new FormTally 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 NewFormTallyWithDefaults() *FormTally {
|
|
this := FormTally{}
|
|
return &this
|
|
}
|
|
|
|
// GetCount returns the Count field value if set, zero value otherwise.
|
|
func (o *FormTally) 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 *FormTally) 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 *FormTally) 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 *FormTally) SetCount(v int64) {
|
|
o.Count = &v
|
|
}
|
|
|
|
// GetLabel returns the Label field value if set, zero value otherwise.
|
|
func (o *FormTally) GetLabel() string {
|
|
if o == nil || IsNil(o.Label) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Label
|
|
}
|
|
|
|
// GetLabelOk returns a tuple with the Label field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *FormTally) GetLabelOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Label) {
|
|
return nil, false
|
|
}
|
|
return o.Label, true
|
|
}
|
|
|
|
// HasLabel returns a boolean if a field has been set.
|
|
func (o *FormTally) HasLabel() bool {
|
|
if o != nil && !IsNil(o.Label) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetLabel gets a reference to the given string and assigns it to the Label field.
|
|
func (o *FormTally) SetLabel(v string) {
|
|
o.Label = &v
|
|
}
|
|
|
|
// GetValue returns the Value field value if set, zero value otherwise.
|
|
func (o *FormTally) GetValue() string {
|
|
if o == nil || IsNil(o.Value) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Value
|
|
}
|
|
|
|
// GetValueOk returns a tuple with the Value field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *FormTally) GetValueOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Value) {
|
|
return nil, false
|
|
}
|
|
return o.Value, true
|
|
}
|
|
|
|
// HasValue returns a boolean if a field has been set.
|
|
func (o *FormTally) HasValue() bool {
|
|
if o != nil && !IsNil(o.Value) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetValue gets a reference to the given string and assigns it to the Value field.
|
|
func (o *FormTally) SetValue(v string) {
|
|
o.Value = &v
|
|
}
|
|
|
|
func (o FormTally) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o FormTally) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Count) {
|
|
toSerialize["count"] = o.Count
|
|
}
|
|
if !IsNil(o.Label) {
|
|
toSerialize["label"] = o.Label
|
|
}
|
|
if !IsNil(o.Value) {
|
|
toSerialize["value"] = o.Value
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *FormTally) UnmarshalJSON(data []byte) (err error) {
|
|
varFormTally := _FormTally{}
|
|
|
|
err = json.Unmarshal(data, &varFormTally)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = FormTally(varFormTally)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "count")
|
|
delete(additionalProperties, "label")
|
|
delete(additionalProperties, "value")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableFormTally struct {
|
|
value *FormTally
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableFormTally) Get() *FormTally {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableFormTally) Set(val *FormTally) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableFormTally) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableFormTally) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableFormTally(val *FormTally) *NullableFormTally {
|
|
return &NullableFormTally{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableFormTally) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableFormTally) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|