Files
sdk/model_auto_run_in.go

269 lines
6.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 AutoRunIn type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &AutoRunIn{}
// AutoRunIn struct for AutoRunIn
type AutoRunIn struct {
// Action is the name of the provider action to invoke.
Action *string `json:"action,omitempty"`
Auth interface{} `json:"auth,omitempty"`
// ID is the provider to run, from the path.
Id *string `json:"id,omitempty"`
// Props are the action's input properties, keyed by property name.
Props map[string]interface{} `json:"props,omitempty"`
AdditionalProperties map[string]interface{}
}
type _AutoRunIn AutoRunIn
// NewAutoRunIn instantiates a new AutoRunIn 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 NewAutoRunIn() *AutoRunIn {
this := AutoRunIn{}
return &this
}
// NewAutoRunInWithDefaults instantiates a new AutoRunIn 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 NewAutoRunInWithDefaults() *AutoRunIn {
this := AutoRunIn{}
return &this
}
// GetAction returns the Action field value if set, zero value otherwise.
func (o *AutoRunIn) GetAction() string {
if o == nil || IsNil(o.Action) {
var ret string
return ret
}
return *o.Action
}
// GetActionOk returns a tuple with the Action field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AutoRunIn) GetActionOk() (*string, bool) {
if o == nil || IsNil(o.Action) {
return nil, false
}
return o.Action, true
}
// HasAction returns a boolean if a field has been set.
func (o *AutoRunIn) HasAction() bool {
if o != nil && !IsNil(o.Action) {
return true
}
return false
}
// SetAction gets a reference to the given string and assigns it to the Action field.
func (o *AutoRunIn) SetAction(v string) {
o.Action = &v
}
// GetAuth returns the Auth field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *AutoRunIn) GetAuth() interface{} {
if o == nil {
var ret interface{}
return ret
}
return o.Auth
}
// GetAuthOk returns a tuple with the Auth field value if set, nil otherwise
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *AutoRunIn) GetAuthOk() (*interface{}, bool) {
if o == nil || IsNil(o.Auth) {
return nil, false
}
return &o.Auth, true
}
// HasAuth returns a boolean if a field has been set.
func (o *AutoRunIn) HasAuth() bool {
if o != nil && !IsNil(o.Auth) {
return true
}
return false
}
// SetAuth gets a reference to the given interface{} and assigns it to the Auth field.
func (o *AutoRunIn) SetAuth(v interface{}) {
o.Auth = v
}
// GetId returns the Id field value if set, zero value otherwise.
func (o *AutoRunIn) 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 *AutoRunIn) 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 *AutoRunIn) 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 *AutoRunIn) SetId(v string) {
o.Id = &v
}
// GetProps returns the Props field value if set, zero value otherwise.
func (o *AutoRunIn) GetProps() map[string]interface{} {
if o == nil || IsNil(o.Props) {
var ret map[string]interface{}
return ret
}
return o.Props
}
// GetPropsOk returns a tuple with the Props field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AutoRunIn) GetPropsOk() (map[string]interface{}, bool) {
if o == nil || IsNil(o.Props) {
return map[string]interface{}{}, false
}
return o.Props, true
}
// HasProps returns a boolean if a field has been set.
func (o *AutoRunIn) HasProps() bool {
if o != nil && !IsNil(o.Props) {
return true
}
return false
}
// SetProps gets a reference to the given map[string]interface{} and assigns it to the Props field.
func (o *AutoRunIn) SetProps(v map[string]interface{}) {
o.Props = v
}
func (o AutoRunIn) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o AutoRunIn) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Action) {
toSerialize["action"] = o.Action
}
if o.Auth != nil {
toSerialize["auth"] = o.Auth
}
if !IsNil(o.Id) {
toSerialize["id"] = o.Id
}
if !IsNil(o.Props) {
toSerialize["props"] = o.Props
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *AutoRunIn) UnmarshalJSON(data []byte) (err error) {
varAutoRunIn := _AutoRunIn{}
err = json.Unmarshal(data, &varAutoRunIn)
if err != nil {
return err
}
*o = AutoRunIn(varAutoRunIn)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "action")
delete(additionalProperties, "auth")
delete(additionalProperties, "id")
delete(additionalProperties, "props")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableAutoRunIn struct {
value *AutoRunIn
isSet bool
}
func (v NullableAutoRunIn) Get() *AutoRunIn {
return v.value
}
func (v *NullableAutoRunIn) Set(val *AutoRunIn) {
v.value = val
v.isSet = true
}
func (v NullableAutoRunIn) IsSet() bool {
return v.isSet
}
func (v *NullableAutoRunIn) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableAutoRunIn(val *AutoRunIn) *NullableAutoRunIn {
return &NullableAutoRunIn{value: val, isSet: true}
}
func (v NullableAutoRunIn) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableAutoRunIn) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}