Files
sdk/model_auto_starter.go

339 lines
8.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 AutoStarter type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &AutoStarter{}
// AutoStarter struct for AutoStarter
type AutoStarter struct {
Description *string `json:"description,omitempty"`
Icon *string `json:"icon,omitempty"`
Instructions *string `json:"instructions,omitempty"`
Key *string `json:"key,omitempty"`
Name *string `json:"name,omitempty"`
Schedule *AutoSchedule `json:"schedule,omitempty"`
AdditionalProperties map[string]interface{}
}
type _AutoStarter AutoStarter
// NewAutoStarter instantiates a new AutoStarter 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 NewAutoStarter() *AutoStarter {
this := AutoStarter{}
return &this
}
// NewAutoStarterWithDefaults instantiates a new AutoStarter 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 NewAutoStarterWithDefaults() *AutoStarter {
this := AutoStarter{}
return &this
}
// GetDescription returns the Description field value if set, zero value otherwise.
func (o *AutoStarter) GetDescription() string {
if o == nil || IsNil(o.Description) {
var ret string
return ret
}
return *o.Description
}
// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AutoStarter) GetDescriptionOk() (*string, bool) {
if o == nil || IsNil(o.Description) {
return nil, false
}
return o.Description, true
}
// HasDescription returns a boolean if a field has been set.
func (o *AutoStarter) HasDescription() bool {
if o != nil && !IsNil(o.Description) {
return true
}
return false
}
// SetDescription gets a reference to the given string and assigns it to the Description field.
func (o *AutoStarter) SetDescription(v string) {
o.Description = &v
}
// GetIcon returns the Icon field value if set, zero value otherwise.
func (o *AutoStarter) GetIcon() string {
if o == nil || IsNil(o.Icon) {
var ret string
return ret
}
return *o.Icon
}
// GetIconOk returns a tuple with the Icon field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AutoStarter) GetIconOk() (*string, bool) {
if o == nil || IsNil(o.Icon) {
return nil, false
}
return o.Icon, true
}
// HasIcon returns a boolean if a field has been set.
func (o *AutoStarter) HasIcon() bool {
if o != nil && !IsNil(o.Icon) {
return true
}
return false
}
// SetIcon gets a reference to the given string and assigns it to the Icon field.
func (o *AutoStarter) SetIcon(v string) {
o.Icon = &v
}
// GetInstructions returns the Instructions field value if set, zero value otherwise.
func (o *AutoStarter) GetInstructions() string {
if o == nil || IsNil(o.Instructions) {
var ret string
return ret
}
return *o.Instructions
}
// GetInstructionsOk returns a tuple with the Instructions field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AutoStarter) GetInstructionsOk() (*string, bool) {
if o == nil || IsNil(o.Instructions) {
return nil, false
}
return o.Instructions, true
}
// HasInstructions returns a boolean if a field has been set.
func (o *AutoStarter) HasInstructions() bool {
if o != nil && !IsNil(o.Instructions) {
return true
}
return false
}
// SetInstructions gets a reference to the given string and assigns it to the Instructions field.
func (o *AutoStarter) SetInstructions(v string) {
o.Instructions = &v
}
// GetKey returns the Key field value if set, zero value otherwise.
func (o *AutoStarter) GetKey() string {
if o == nil || IsNil(o.Key) {
var ret string
return ret
}
return *o.Key
}
// GetKeyOk returns a tuple with the Key field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AutoStarter) GetKeyOk() (*string, bool) {
if o == nil || IsNil(o.Key) {
return nil, false
}
return o.Key, true
}
// HasKey returns a boolean if a field has been set.
func (o *AutoStarter) HasKey() bool {
if o != nil && !IsNil(o.Key) {
return true
}
return false
}
// SetKey gets a reference to the given string and assigns it to the Key field.
func (o *AutoStarter) SetKey(v string) {
o.Key = &v
}
// GetName returns the Name field value if set, zero value otherwise.
func (o *AutoStarter) 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 *AutoStarter) 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 *AutoStarter) 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 *AutoStarter) SetName(v string) {
o.Name = &v
}
// GetSchedule returns the Schedule field value if set, zero value otherwise.
func (o *AutoStarter) 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 *AutoStarter) 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 *AutoStarter) 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 *AutoStarter) SetSchedule(v AutoSchedule) {
o.Schedule = &v
}
func (o AutoStarter) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o AutoStarter) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Description) {
toSerialize["description"] = o.Description
}
if !IsNil(o.Icon) {
toSerialize["icon"] = o.Icon
}
if !IsNil(o.Instructions) {
toSerialize["instructions"] = o.Instructions
}
if !IsNil(o.Key) {
toSerialize["key"] = o.Key
}
if !IsNil(o.Name) {
toSerialize["name"] = o.Name
}
if !IsNil(o.Schedule) {
toSerialize["schedule"] = o.Schedule
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *AutoStarter) UnmarshalJSON(data []byte) (err error) {
varAutoStarter := _AutoStarter{}
err = json.Unmarshal(data, &varAutoStarter)
if err != nil {
return err
}
*o = AutoStarter(varAutoStarter)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "description")
delete(additionalProperties, "icon")
delete(additionalProperties, "instructions")
delete(additionalProperties, "key")
delete(additionalProperties, "name")
delete(additionalProperties, "schedule")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableAutoStarter struct {
value *AutoStarter
isSet bool
}
func (v NullableAutoStarter) Get() *AutoStarter {
return v.value
}
func (v *NullableAutoStarter) Set(val *AutoStarter) {
v.value = val
v.isSet = true
}
func (v NullableAutoStarter) IsSet() bool {
return v.isSet
}
func (v *NullableAutoStarter) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableAutoStarter(val *AutoStarter) *NullableAutoStarter {
return &NullableAutoStarter{value: val, isSet: true}
}
func (v NullableAutoStarter) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableAutoStarter) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}