Files
sdk/model_provider_run_in.go

231 lines
5.9 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 ProviderRunIn type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &ProviderRunIn{}
// ProviderRunIn struct for ProviderRunIn
type ProviderRunIn struct {
// Action is the action's name, as GET /v1/provider/{provider} lists it.
Action *string `json:"action,omitempty"`
// Input is the action's props, by name.
Input map[string]interface{} `json:"input,omitempty"`
// Provider is the connector, from the path.
Provider *string `json:"provider,omitempty"`
AdditionalProperties map[string]interface{}
}
type _ProviderRunIn ProviderRunIn
// NewProviderRunIn instantiates a new ProviderRunIn 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 NewProviderRunIn() *ProviderRunIn {
this := ProviderRunIn{}
return &this
}
// NewProviderRunInWithDefaults instantiates a new ProviderRunIn 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 NewProviderRunInWithDefaults() *ProviderRunIn {
this := ProviderRunIn{}
return &this
}
// GetAction returns the Action field value if set, zero value otherwise.
func (o *ProviderRunIn) 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 *ProviderRunIn) 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 *ProviderRunIn) 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 *ProviderRunIn) SetAction(v string) {
o.Action = &v
}
// GetInput returns the Input field value if set, zero value otherwise.
func (o *ProviderRunIn) GetInput() map[string]interface{} {
if o == nil || IsNil(o.Input) {
var ret map[string]interface{}
return ret
}
return o.Input
}
// GetInputOk returns a tuple with the Input field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ProviderRunIn) GetInputOk() (map[string]interface{}, bool) {
if o == nil || IsNil(o.Input) {
return map[string]interface{}{}, false
}
return o.Input, true
}
// HasInput returns a boolean if a field has been set.
func (o *ProviderRunIn) HasInput() bool {
if o != nil && !IsNil(o.Input) {
return true
}
return false
}
// SetInput gets a reference to the given map[string]interface{} and assigns it to the Input field.
func (o *ProviderRunIn) SetInput(v map[string]interface{}) {
o.Input = v
}
// GetProvider returns the Provider field value if set, zero value otherwise.
func (o *ProviderRunIn) GetProvider() string {
if o == nil || IsNil(o.Provider) {
var ret string
return ret
}
return *o.Provider
}
// GetProviderOk returns a tuple with the Provider field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ProviderRunIn) GetProviderOk() (*string, bool) {
if o == nil || IsNil(o.Provider) {
return nil, false
}
return o.Provider, true
}
// HasProvider returns a boolean if a field has been set.
func (o *ProviderRunIn) HasProvider() bool {
if o != nil && !IsNil(o.Provider) {
return true
}
return false
}
// SetProvider gets a reference to the given string and assigns it to the Provider field.
func (o *ProviderRunIn) SetProvider(v string) {
o.Provider = &v
}
func (o ProviderRunIn) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o ProviderRunIn) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Action) {
toSerialize["action"] = o.Action
}
if !IsNil(o.Input) {
toSerialize["input"] = o.Input
}
if !IsNil(o.Provider) {
toSerialize["provider"] = o.Provider
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *ProviderRunIn) UnmarshalJSON(data []byte) (err error) {
varProviderRunIn := _ProviderRunIn{}
err = json.Unmarshal(data, &varProviderRunIn)
if err != nil {
return err
}
*o = ProviderRunIn(varProviderRunIn)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "action")
delete(additionalProperties, "input")
delete(additionalProperties, "provider")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableProviderRunIn struct {
value *ProviderRunIn
isSet bool
}
func (v NullableProviderRunIn) Get() *ProviderRunIn {
return v.value
}
func (v *NullableProviderRunIn) Set(val *ProviderRunIn) {
v.value = val
v.isSet = true
}
func (v NullableProviderRunIn) IsSet() bool {
return v.isSet
}
func (v *NullableProviderRunIn) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableProviderRunIn(val *ProviderRunIn) *NullableProviderRunIn {
return &NullableProviderRunIn{value: val, isSet: true}
}
func (v NullableProviderRunIn) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableProviderRunIn) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}