mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
383 lines
9.5 KiB
Go
383 lines
9.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 FormTheme type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &FormTheme{}
|
|
|
|
// FormTheme struct for FormTheme
|
|
type FormTheme struct {
|
|
// Background is an https address of an image drawn behind the form. Optional.
|
|
Background *string `json:"background,omitempty"`
|
|
// Colors are the theme's colours, each #rrggbb.
|
|
Colors *FormColors `json:"colors,omitempty"`
|
|
// Created is when the theme was made, RFC 3339.
|
|
Created *string `json:"created,omitempty"`
|
|
// Font is the font family the form is set in: letters, digits, spaces and dashes, at most 64. Empty is the renderer's own.
|
|
Font *string `json:"font,omitempty"`
|
|
// ID is the theme's id.
|
|
Id *string `json:"id,omitempty"`
|
|
// Name is the theme's name in its org. At most 100 characters.
|
|
Name *string `json:"name,omitempty"`
|
|
// Updated is when it last changed, RFC 3339.
|
|
Updated *string `json:"updated,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _FormTheme FormTheme
|
|
|
|
// NewFormTheme instantiates a new FormTheme 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 NewFormTheme() *FormTheme {
|
|
this := FormTheme{}
|
|
return &this
|
|
}
|
|
|
|
// NewFormThemeWithDefaults instantiates a new FormTheme 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 NewFormThemeWithDefaults() *FormTheme {
|
|
this := FormTheme{}
|
|
return &this
|
|
}
|
|
|
|
// GetBackground returns the Background field value if set, zero value otherwise.
|
|
func (o *FormTheme) GetBackground() string {
|
|
if o == nil || IsNil(o.Background) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Background
|
|
}
|
|
|
|
// GetBackgroundOk returns a tuple with the Background field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *FormTheme) GetBackgroundOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Background) {
|
|
return nil, false
|
|
}
|
|
return o.Background, true
|
|
}
|
|
|
|
// HasBackground returns a boolean if a field has been set.
|
|
func (o *FormTheme) HasBackground() bool {
|
|
if o != nil && !IsNil(o.Background) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetBackground gets a reference to the given string and assigns it to the Background field.
|
|
func (o *FormTheme) SetBackground(v string) {
|
|
o.Background = &v
|
|
}
|
|
|
|
// GetColors returns the Colors field value if set, zero value otherwise.
|
|
func (o *FormTheme) GetColors() FormColors {
|
|
if o == nil || IsNil(o.Colors) {
|
|
var ret FormColors
|
|
return ret
|
|
}
|
|
return *o.Colors
|
|
}
|
|
|
|
// GetColorsOk returns a tuple with the Colors field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *FormTheme) GetColorsOk() (*FormColors, bool) {
|
|
if o == nil || IsNil(o.Colors) {
|
|
return nil, false
|
|
}
|
|
return o.Colors, true
|
|
}
|
|
|
|
// HasColors returns a boolean if a field has been set.
|
|
func (o *FormTheme) HasColors() bool {
|
|
if o != nil && !IsNil(o.Colors) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetColors gets a reference to the given FormColors and assigns it to the Colors field.
|
|
func (o *FormTheme) SetColors(v FormColors) {
|
|
o.Colors = &v
|
|
}
|
|
|
|
// GetCreated returns the Created field value if set, zero value otherwise.
|
|
func (o *FormTheme) GetCreated() string {
|
|
if o == nil || IsNil(o.Created) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Created
|
|
}
|
|
|
|
// GetCreatedOk returns a tuple with the Created field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *FormTheme) GetCreatedOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Created) {
|
|
return nil, false
|
|
}
|
|
return o.Created, true
|
|
}
|
|
|
|
// HasCreated returns a boolean if a field has been set.
|
|
func (o *FormTheme) HasCreated() bool {
|
|
if o != nil && !IsNil(o.Created) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetCreated gets a reference to the given string and assigns it to the Created field.
|
|
func (o *FormTheme) SetCreated(v string) {
|
|
o.Created = &v
|
|
}
|
|
|
|
// GetFont returns the Font field value if set, zero value otherwise.
|
|
func (o *FormTheme) GetFont() string {
|
|
if o == nil || IsNil(o.Font) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Font
|
|
}
|
|
|
|
// GetFontOk returns a tuple with the Font field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *FormTheme) GetFontOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Font) {
|
|
return nil, false
|
|
}
|
|
return o.Font, true
|
|
}
|
|
|
|
// HasFont returns a boolean if a field has been set.
|
|
func (o *FormTheme) HasFont() bool {
|
|
if o != nil && !IsNil(o.Font) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetFont gets a reference to the given string and assigns it to the Font field.
|
|
func (o *FormTheme) SetFont(v string) {
|
|
o.Font = &v
|
|
}
|
|
|
|
// GetId returns the Id field value if set, zero value otherwise.
|
|
func (o *FormTheme) GetId() string {
|
|
if o == nil || IsNil(o.Id) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Id
|
|
}
|
|
|
|
// GetIdOk returns a tuple with the Id field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *FormTheme) GetIdOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Id) {
|
|
return nil, false
|
|
}
|
|
return o.Id, true
|
|
}
|
|
|
|
// HasId returns a boolean if a field has been set.
|
|
func (o *FormTheme) HasId() bool {
|
|
if o != nil && !IsNil(o.Id) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetId gets a reference to the given string and assigns it to the Id field.
|
|
func (o *FormTheme) SetId(v string) {
|
|
o.Id = &v
|
|
}
|
|
|
|
// GetName returns the Name field value if set, zero value otherwise.
|
|
func (o *FormTheme) 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 *FormTheme) 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 *FormTheme) 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 *FormTheme) SetName(v string) {
|
|
o.Name = &v
|
|
}
|
|
|
|
// GetUpdated returns the Updated field value if set, zero value otherwise.
|
|
func (o *FormTheme) GetUpdated() string {
|
|
if o == nil || IsNil(o.Updated) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Updated
|
|
}
|
|
|
|
// GetUpdatedOk returns a tuple with the Updated field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *FormTheme) GetUpdatedOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Updated) {
|
|
return nil, false
|
|
}
|
|
return o.Updated, true
|
|
}
|
|
|
|
// HasUpdated returns a boolean if a field has been set.
|
|
func (o *FormTheme) HasUpdated() bool {
|
|
if o != nil && !IsNil(o.Updated) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetUpdated gets a reference to the given string and assigns it to the Updated field.
|
|
func (o *FormTheme) SetUpdated(v string) {
|
|
o.Updated = &v
|
|
}
|
|
|
|
func (o FormTheme) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o FormTheme) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Background) {
|
|
toSerialize["background"] = o.Background
|
|
}
|
|
if !IsNil(o.Colors) {
|
|
toSerialize["colors"] = o.Colors
|
|
}
|
|
if !IsNil(o.Created) {
|
|
toSerialize["created"] = o.Created
|
|
}
|
|
if !IsNil(o.Font) {
|
|
toSerialize["font"] = o.Font
|
|
}
|
|
if !IsNil(o.Id) {
|
|
toSerialize["id"] = o.Id
|
|
}
|
|
if !IsNil(o.Name) {
|
|
toSerialize["name"] = o.Name
|
|
}
|
|
if !IsNil(o.Updated) {
|
|
toSerialize["updated"] = o.Updated
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *FormTheme) UnmarshalJSON(data []byte) (err error) {
|
|
varFormTheme := _FormTheme{}
|
|
|
|
err = json.Unmarshal(data, &varFormTheme)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = FormTheme(varFormTheme)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "background")
|
|
delete(additionalProperties, "colors")
|
|
delete(additionalProperties, "created")
|
|
delete(additionalProperties, "font")
|
|
delete(additionalProperties, "id")
|
|
delete(additionalProperties, "name")
|
|
delete(additionalProperties, "updated")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableFormTheme struct {
|
|
value *FormTheme
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableFormTheme) Get() *FormTheme {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableFormTheme) Set(val *FormTheme) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableFormTheme) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableFormTheme) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableFormTheme(val *FormTheme) *NullableFormTheme {
|
|
return &NullableFormTheme{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableFormTheme) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableFormTheme) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|