Files
sdk/model_provider_run_out.go

231 lines
5.8 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 ProviderRunOut type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &ProviderRunOut{}
// ProviderRunOut struct for ProviderRunOut
type ProviderRunOut struct {
// Error is why the action failed, when it did.
Error *string `json:"error,omitempty"`
// Ok is whether the action ran to completion.
Ok *bool `json:"ok,omitempty"`
Output interface{} `json:"output,omitempty"`
AdditionalProperties map[string]interface{}
}
type _ProviderRunOut ProviderRunOut
// NewProviderRunOut instantiates a new ProviderRunOut 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 NewProviderRunOut() *ProviderRunOut {
this := ProviderRunOut{}
return &this
}
// NewProviderRunOutWithDefaults instantiates a new ProviderRunOut 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 NewProviderRunOutWithDefaults() *ProviderRunOut {
this := ProviderRunOut{}
return &this
}
// GetError returns the Error field value if set, zero value otherwise.
func (o *ProviderRunOut) GetError() string {
if o == nil || IsNil(o.Error) {
var ret string
return ret
}
return *o.Error
}
// GetErrorOk returns a tuple with the Error field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ProviderRunOut) GetErrorOk() (*string, bool) {
if o == nil || IsNil(o.Error) {
return nil, false
}
return o.Error, true
}
// HasError returns a boolean if a field has been set.
func (o *ProviderRunOut) HasError() bool {
if o != nil && !IsNil(o.Error) {
return true
}
return false
}
// SetError gets a reference to the given string and assigns it to the Error field.
func (o *ProviderRunOut) SetError(v string) {
o.Error = &v
}
// GetOk returns the Ok field value if set, zero value otherwise.
func (o *ProviderRunOut) GetOk() bool {
if o == nil || IsNil(o.Ok) {
var ret bool
return ret
}
return *o.Ok
}
// GetOkOk returns a tuple with the Ok field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ProviderRunOut) GetOkOk() (*bool, bool) {
if o == nil || IsNil(o.Ok) {
return nil, false
}
return o.Ok, true
}
// HasOk returns a boolean if a field has been set.
func (o *ProviderRunOut) HasOk() bool {
if o != nil && !IsNil(o.Ok) {
return true
}
return false
}
// SetOk gets a reference to the given bool and assigns it to the Ok field.
func (o *ProviderRunOut) SetOk(v bool) {
o.Ok = &v
}
// GetOutput returns the Output field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *ProviderRunOut) GetOutput() interface{} {
if o == nil {
var ret interface{}
return ret
}
return o.Output
}
// GetOutputOk returns a tuple with the Output 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 *ProviderRunOut) GetOutputOk() (*interface{}, bool) {
if o == nil || IsNil(o.Output) {
return nil, false
}
return &o.Output, true
}
// HasOutput returns a boolean if a field has been set.
func (o *ProviderRunOut) HasOutput() bool {
if o != nil && !IsNil(o.Output) {
return true
}
return false
}
// SetOutput gets a reference to the given interface{} and assigns it to the Output field.
func (o *ProviderRunOut) SetOutput(v interface{}) {
o.Output = v
}
func (o ProviderRunOut) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o ProviderRunOut) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Error) {
toSerialize["error"] = o.Error
}
if !IsNil(o.Ok) {
toSerialize["ok"] = o.Ok
}
if o.Output != nil {
toSerialize["output"] = o.Output
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *ProviderRunOut) UnmarshalJSON(data []byte) (err error) {
varProviderRunOut := _ProviderRunOut{}
err = json.Unmarshal(data, &varProviderRunOut)
if err != nil {
return err
}
*o = ProviderRunOut(varProviderRunOut)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "error")
delete(additionalProperties, "ok")
delete(additionalProperties, "output")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableProviderRunOut struct {
value *ProviderRunOut
isSet bool
}
func (v NullableProviderRunOut) Get() *ProviderRunOut {
return v.value
}
func (v *NullableProviderRunOut) Set(val *ProviderRunOut) {
v.value = val
v.isSet = true
}
func (v NullableProviderRunOut) IsSet() bool {
return v.isSet
}
func (v *NullableProviderRunOut) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableProviderRunOut(val *ProviderRunOut) *NullableProviderRunOut {
return &NullableProviderRunOut{value: val, isSet: true}
}
func (v NullableProviderRunOut) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableProviderRunOut) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}