mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
193 lines
4.6 KiB
Go
193 lines
4.6 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 AutoWhenIn type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &AutoWhenIn{}
|
|
|
|
// AutoWhenIn struct for AutoWhenIn
|
|
type AutoWhenIn struct {
|
|
// Text is when it runs, as a person says it: \"every monday at 9am\".
|
|
Text *string `json:"text,omitempty"`
|
|
// TZ is the IANA zone the words are read in. Empty is UTC.
|
|
Tz *string `json:"tz,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _AutoWhenIn AutoWhenIn
|
|
|
|
// NewAutoWhenIn instantiates a new AutoWhenIn 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 NewAutoWhenIn() *AutoWhenIn {
|
|
this := AutoWhenIn{}
|
|
return &this
|
|
}
|
|
|
|
// NewAutoWhenInWithDefaults instantiates a new AutoWhenIn 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 NewAutoWhenInWithDefaults() *AutoWhenIn {
|
|
this := AutoWhenIn{}
|
|
return &this
|
|
}
|
|
|
|
// GetText returns the Text field value if set, zero value otherwise.
|
|
func (o *AutoWhenIn) GetText() string {
|
|
if o == nil || IsNil(o.Text) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Text
|
|
}
|
|
|
|
// GetTextOk returns a tuple with the Text field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AutoWhenIn) GetTextOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Text) {
|
|
return nil, false
|
|
}
|
|
return o.Text, true
|
|
}
|
|
|
|
// HasText returns a boolean if a field has been set.
|
|
func (o *AutoWhenIn) HasText() bool {
|
|
if o != nil && !IsNil(o.Text) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetText gets a reference to the given string and assigns it to the Text field.
|
|
func (o *AutoWhenIn) SetText(v string) {
|
|
o.Text = &v
|
|
}
|
|
|
|
// GetTz returns the Tz field value if set, zero value otherwise.
|
|
func (o *AutoWhenIn) GetTz() string {
|
|
if o == nil || IsNil(o.Tz) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Tz
|
|
}
|
|
|
|
// GetTzOk returns a tuple with the Tz field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AutoWhenIn) GetTzOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Tz) {
|
|
return nil, false
|
|
}
|
|
return o.Tz, true
|
|
}
|
|
|
|
// HasTz returns a boolean if a field has been set.
|
|
func (o *AutoWhenIn) HasTz() bool {
|
|
if o != nil && !IsNil(o.Tz) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetTz gets a reference to the given string and assigns it to the Tz field.
|
|
func (o *AutoWhenIn) SetTz(v string) {
|
|
o.Tz = &v
|
|
}
|
|
|
|
func (o AutoWhenIn) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o AutoWhenIn) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Text) {
|
|
toSerialize["text"] = o.Text
|
|
}
|
|
if !IsNil(o.Tz) {
|
|
toSerialize["tz"] = o.Tz
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *AutoWhenIn) UnmarshalJSON(data []byte) (err error) {
|
|
varAutoWhenIn := _AutoWhenIn{}
|
|
|
|
err = json.Unmarshal(data, &varAutoWhenIn)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = AutoWhenIn(varAutoWhenIn)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "text")
|
|
delete(additionalProperties, "tz")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableAutoWhenIn struct {
|
|
value *AutoWhenIn
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableAutoWhenIn) Get() *AutoWhenIn {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableAutoWhenIn) Set(val *AutoWhenIn) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableAutoWhenIn) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableAutoWhenIn) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableAutoWhenIn(val *AutoWhenIn) *NullableAutoWhenIn {
|
|
return &NullableAutoWhenIn{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableAutoWhenIn) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableAutoWhenIn) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|