mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
307 lines
7.7 KiB
Go
307 lines
7.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 AutoSchedule type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &AutoSchedule{}
|
|
|
|
// AutoSchedule struct for AutoSchedule
|
|
type AutoSchedule struct {
|
|
// At is the local time, HH:MM on a 24-hour clock, for daily, weekdays and weekly. Hourly takes its minute, and runs on the hour without one. Once takes a local date and time, YYYY-MM-DDTHH:MM, and runs now without one.
|
|
At *string `json:"at,omitempty"`
|
|
// Cron is a five-field cron expression (minute hour day-of-month month day-of-week), for kind cron only, read in TZ.
|
|
Cron *string `json:"cron,omitempty"`
|
|
// Day is the weekday a weekly schedule runs on: mon, tue, wed, thu, fri, sat or sun.
|
|
Day *string `json:"day,omitempty"`
|
|
// Kind is manual, hourly, daily, weekdays, weekly, cron or once. Manual runs only when asked; once runs one time and then switches itself off.
|
|
Kind *string `json:"kind,omitempty"`
|
|
// TZ is the IANA time zone every time here is read in. Empty is UTC.
|
|
Tz *string `json:"tz,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _AutoSchedule AutoSchedule
|
|
|
|
// NewAutoSchedule instantiates a new AutoSchedule 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 NewAutoSchedule() *AutoSchedule {
|
|
this := AutoSchedule{}
|
|
return &this
|
|
}
|
|
|
|
// NewAutoScheduleWithDefaults instantiates a new AutoSchedule 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 NewAutoScheduleWithDefaults() *AutoSchedule {
|
|
this := AutoSchedule{}
|
|
return &this
|
|
}
|
|
|
|
// GetAt returns the At field value if set, zero value otherwise.
|
|
func (o *AutoSchedule) GetAt() string {
|
|
if o == nil || IsNil(o.At) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.At
|
|
}
|
|
|
|
// GetAtOk returns a tuple with the At field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AutoSchedule) GetAtOk() (*string, bool) {
|
|
if o == nil || IsNil(o.At) {
|
|
return nil, false
|
|
}
|
|
return o.At, true
|
|
}
|
|
|
|
// HasAt returns a boolean if a field has been set.
|
|
func (o *AutoSchedule) HasAt() bool {
|
|
if o != nil && !IsNil(o.At) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetAt gets a reference to the given string and assigns it to the At field.
|
|
func (o *AutoSchedule) SetAt(v string) {
|
|
o.At = &v
|
|
}
|
|
|
|
// GetCron returns the Cron field value if set, zero value otherwise.
|
|
func (o *AutoSchedule) GetCron() string {
|
|
if o == nil || IsNil(o.Cron) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Cron
|
|
}
|
|
|
|
// GetCronOk returns a tuple with the Cron field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AutoSchedule) GetCronOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Cron) {
|
|
return nil, false
|
|
}
|
|
return o.Cron, true
|
|
}
|
|
|
|
// HasCron returns a boolean if a field has been set.
|
|
func (o *AutoSchedule) HasCron() bool {
|
|
if o != nil && !IsNil(o.Cron) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetCron gets a reference to the given string and assigns it to the Cron field.
|
|
func (o *AutoSchedule) SetCron(v string) {
|
|
o.Cron = &v
|
|
}
|
|
|
|
// GetDay returns the Day field value if set, zero value otherwise.
|
|
func (o *AutoSchedule) GetDay() string {
|
|
if o == nil || IsNil(o.Day) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Day
|
|
}
|
|
|
|
// GetDayOk returns a tuple with the Day field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AutoSchedule) GetDayOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Day) {
|
|
return nil, false
|
|
}
|
|
return o.Day, true
|
|
}
|
|
|
|
// HasDay returns a boolean if a field has been set.
|
|
func (o *AutoSchedule) HasDay() bool {
|
|
if o != nil && !IsNil(o.Day) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetDay gets a reference to the given string and assigns it to the Day field.
|
|
func (o *AutoSchedule) SetDay(v string) {
|
|
o.Day = &v
|
|
}
|
|
|
|
// GetKind returns the Kind field value if set, zero value otherwise.
|
|
func (o *AutoSchedule) GetKind() string {
|
|
if o == nil || IsNil(o.Kind) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Kind
|
|
}
|
|
|
|
// GetKindOk returns a tuple with the Kind field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AutoSchedule) GetKindOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Kind) {
|
|
return nil, false
|
|
}
|
|
return o.Kind, true
|
|
}
|
|
|
|
// HasKind returns a boolean if a field has been set.
|
|
func (o *AutoSchedule) HasKind() bool {
|
|
if o != nil && !IsNil(o.Kind) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetKind gets a reference to the given string and assigns it to the Kind field.
|
|
func (o *AutoSchedule) SetKind(v string) {
|
|
o.Kind = &v
|
|
}
|
|
|
|
// GetTz returns the Tz field value if set, zero value otherwise.
|
|
func (o *AutoSchedule) 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 *AutoSchedule) 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 *AutoSchedule) 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 *AutoSchedule) SetTz(v string) {
|
|
o.Tz = &v
|
|
}
|
|
|
|
func (o AutoSchedule) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o AutoSchedule) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.At) {
|
|
toSerialize["at"] = o.At
|
|
}
|
|
if !IsNil(o.Cron) {
|
|
toSerialize["cron"] = o.Cron
|
|
}
|
|
if !IsNil(o.Day) {
|
|
toSerialize["day"] = o.Day
|
|
}
|
|
if !IsNil(o.Kind) {
|
|
toSerialize["kind"] = o.Kind
|
|
}
|
|
if !IsNil(o.Tz) {
|
|
toSerialize["tz"] = o.Tz
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *AutoSchedule) UnmarshalJSON(data []byte) (err error) {
|
|
varAutoSchedule := _AutoSchedule{}
|
|
|
|
err = json.Unmarshal(data, &varAutoSchedule)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = AutoSchedule(varAutoSchedule)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "at")
|
|
delete(additionalProperties, "cron")
|
|
delete(additionalProperties, "day")
|
|
delete(additionalProperties, "kind")
|
|
delete(additionalProperties, "tz")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableAutoSchedule struct {
|
|
value *AutoSchedule
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableAutoSchedule) Get() *AutoSchedule {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableAutoSchedule) Set(val *AutoSchedule) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableAutoSchedule) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableAutoSchedule) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableAutoSchedule(val *AutoSchedule) *NullableAutoSchedule {
|
|
return &NullableAutoSchedule{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableAutoSchedule) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableAutoSchedule) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|