mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
231 lines
5.7 KiB
Go
231 lines
5.7 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 AutoWhenOut type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &AutoWhenOut{}
|
|
|
|
// AutoWhenOut struct for AutoWhenOut
|
|
type AutoWhenOut struct {
|
|
// Next is when it would first run, RFC 3339 UTC; null when it runs only on demand.
|
|
Next *string `json:"next,omitempty"`
|
|
// Says is the schedule said back in plain words.
|
|
Says *string `json:"says,omitempty"`
|
|
// Schedule is the schedule, ready to send as an automation's `schedule`.
|
|
Schedule *AutoSchedule `json:"schedule,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _AutoWhenOut AutoWhenOut
|
|
|
|
// NewAutoWhenOut instantiates a new AutoWhenOut 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 NewAutoWhenOut() *AutoWhenOut {
|
|
this := AutoWhenOut{}
|
|
return &this
|
|
}
|
|
|
|
// NewAutoWhenOutWithDefaults instantiates a new AutoWhenOut 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 NewAutoWhenOutWithDefaults() *AutoWhenOut {
|
|
this := AutoWhenOut{}
|
|
return &this
|
|
}
|
|
|
|
// GetNext returns the Next field value if set, zero value otherwise.
|
|
func (o *AutoWhenOut) GetNext() string {
|
|
if o == nil || IsNil(o.Next) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Next
|
|
}
|
|
|
|
// GetNextOk returns a tuple with the Next field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AutoWhenOut) GetNextOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Next) {
|
|
return nil, false
|
|
}
|
|
return o.Next, true
|
|
}
|
|
|
|
// HasNext returns a boolean if a field has been set.
|
|
func (o *AutoWhenOut) HasNext() bool {
|
|
if o != nil && !IsNil(o.Next) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetNext gets a reference to the given string and assigns it to the Next field.
|
|
func (o *AutoWhenOut) SetNext(v string) {
|
|
o.Next = &v
|
|
}
|
|
|
|
// GetSays returns the Says field value if set, zero value otherwise.
|
|
func (o *AutoWhenOut) GetSays() string {
|
|
if o == nil || IsNil(o.Says) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Says
|
|
}
|
|
|
|
// GetSaysOk returns a tuple with the Says field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AutoWhenOut) GetSaysOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Says) {
|
|
return nil, false
|
|
}
|
|
return o.Says, true
|
|
}
|
|
|
|
// HasSays returns a boolean if a field has been set.
|
|
func (o *AutoWhenOut) HasSays() bool {
|
|
if o != nil && !IsNil(o.Says) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetSays gets a reference to the given string and assigns it to the Says field.
|
|
func (o *AutoWhenOut) SetSays(v string) {
|
|
o.Says = &v
|
|
}
|
|
|
|
// GetSchedule returns the Schedule field value if set, zero value otherwise.
|
|
func (o *AutoWhenOut) GetSchedule() AutoSchedule {
|
|
if o == nil || IsNil(o.Schedule) {
|
|
var ret AutoSchedule
|
|
return ret
|
|
}
|
|
return *o.Schedule
|
|
}
|
|
|
|
// GetScheduleOk returns a tuple with the Schedule field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AutoWhenOut) GetScheduleOk() (*AutoSchedule, bool) {
|
|
if o == nil || IsNil(o.Schedule) {
|
|
return nil, false
|
|
}
|
|
return o.Schedule, true
|
|
}
|
|
|
|
// HasSchedule returns a boolean if a field has been set.
|
|
func (o *AutoWhenOut) HasSchedule() bool {
|
|
if o != nil && !IsNil(o.Schedule) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetSchedule gets a reference to the given AutoSchedule and assigns it to the Schedule field.
|
|
func (o *AutoWhenOut) SetSchedule(v AutoSchedule) {
|
|
o.Schedule = &v
|
|
}
|
|
|
|
func (o AutoWhenOut) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o AutoWhenOut) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Next) {
|
|
toSerialize["next"] = o.Next
|
|
}
|
|
if !IsNil(o.Says) {
|
|
toSerialize["says"] = o.Says
|
|
}
|
|
if !IsNil(o.Schedule) {
|
|
toSerialize["schedule"] = o.Schedule
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *AutoWhenOut) UnmarshalJSON(data []byte) (err error) {
|
|
varAutoWhenOut := _AutoWhenOut{}
|
|
|
|
err = json.Unmarshal(data, &varAutoWhenOut)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = AutoWhenOut(varAutoWhenOut)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "next")
|
|
delete(additionalProperties, "says")
|
|
delete(additionalProperties, "schedule")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableAutoWhenOut struct {
|
|
value *AutoWhenOut
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableAutoWhenOut) Get() *AutoWhenOut {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableAutoWhenOut) Set(val *AutoWhenOut) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableAutoWhenOut) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableAutoWhenOut) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableAutoWhenOut(val *AutoWhenOut) *NullableAutoWhenOut {
|
|
return &NullableAutoWhenOut{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableAutoWhenOut) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableAutoWhenOut) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|