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 FormLabels type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &FormLabels{}
|
|
|
|
// FormLabels struct for FormLabels
|
|
type FormLabels struct {
|
|
Center *string `json:"center,omitempty"`
|
|
Left *string `json:"left,omitempty"`
|
|
Right *string `json:"right,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _FormLabels FormLabels
|
|
|
|
// NewFormLabels instantiates a new FormLabels 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 NewFormLabels() *FormLabels {
|
|
this := FormLabels{}
|
|
return &this
|
|
}
|
|
|
|
// NewFormLabelsWithDefaults instantiates a new FormLabels 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 NewFormLabelsWithDefaults() *FormLabels {
|
|
this := FormLabels{}
|
|
return &this
|
|
}
|
|
|
|
// GetCenter returns the Center field value if set, zero value otherwise.
|
|
func (o *FormLabels) GetCenter() string {
|
|
if o == nil || IsNil(o.Center) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Center
|
|
}
|
|
|
|
// GetCenterOk returns a tuple with the Center field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *FormLabels) GetCenterOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Center) {
|
|
return nil, false
|
|
}
|
|
return o.Center, true
|
|
}
|
|
|
|
// HasCenter returns a boolean if a field has been set.
|
|
func (o *FormLabels) HasCenter() bool {
|
|
if o != nil && !IsNil(o.Center) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetCenter gets a reference to the given string and assigns it to the Center field.
|
|
func (o *FormLabels) SetCenter(v string) {
|
|
o.Center = &v
|
|
}
|
|
|
|
// GetLeft returns the Left field value if set, zero value otherwise.
|
|
func (o *FormLabels) GetLeft() string {
|
|
if o == nil || IsNil(o.Left) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Left
|
|
}
|
|
|
|
// GetLeftOk returns a tuple with the Left field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *FormLabels) GetLeftOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Left) {
|
|
return nil, false
|
|
}
|
|
return o.Left, true
|
|
}
|
|
|
|
// HasLeft returns a boolean if a field has been set.
|
|
func (o *FormLabels) HasLeft() bool {
|
|
if o != nil && !IsNil(o.Left) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetLeft gets a reference to the given string and assigns it to the Left field.
|
|
func (o *FormLabels) SetLeft(v string) {
|
|
o.Left = &v
|
|
}
|
|
|
|
// GetRight returns the Right field value if set, zero value otherwise.
|
|
func (o *FormLabels) GetRight() string {
|
|
if o == nil || IsNil(o.Right) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Right
|
|
}
|
|
|
|
// GetRightOk returns a tuple with the Right field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *FormLabels) GetRightOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Right) {
|
|
return nil, false
|
|
}
|
|
return o.Right, true
|
|
}
|
|
|
|
// HasRight returns a boolean if a field has been set.
|
|
func (o *FormLabels) HasRight() bool {
|
|
if o != nil && !IsNil(o.Right) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetRight gets a reference to the given string and assigns it to the Right field.
|
|
func (o *FormLabels) SetRight(v string) {
|
|
o.Right = &v
|
|
}
|
|
|
|
func (o FormLabels) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o FormLabels) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Center) {
|
|
toSerialize["center"] = o.Center
|
|
}
|
|
if !IsNil(o.Left) {
|
|
toSerialize["left"] = o.Left
|
|
}
|
|
if !IsNil(o.Right) {
|
|
toSerialize["right"] = o.Right
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *FormLabels) UnmarshalJSON(data []byte) (err error) {
|
|
varFormLabels := _FormLabels{}
|
|
|
|
err = json.Unmarshal(data, &varFormLabels)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = FormLabels(varFormLabels)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "center")
|
|
delete(additionalProperties, "left")
|
|
delete(additionalProperties, "right")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableFormLabels struct {
|
|
value *FormLabels
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableFormLabels) Get() *FormLabels {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableFormLabels) Set(val *FormLabels) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableFormLabels) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableFormLabels) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableFormLabels(val *FormLabels) *NullableFormLabels {
|
|
return &NullableFormLabels{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableFormLabels) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableFormLabels) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|