Files
sdk/model_function_fn_list.go

155 lines
4.0 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 FunctionFnList type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &FunctionFnList{}
// FunctionFnList struct for FunctionFnList
type FunctionFnList struct {
// Functions is one row per published function.
Functions []FunctionFunctionView `json:"functions,omitempty"`
AdditionalProperties map[string]interface{}
}
type _FunctionFnList FunctionFnList
// NewFunctionFnList instantiates a new FunctionFnList 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 NewFunctionFnList() *FunctionFnList {
this := FunctionFnList{}
return &this
}
// NewFunctionFnListWithDefaults instantiates a new FunctionFnList 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 NewFunctionFnListWithDefaults() *FunctionFnList {
this := FunctionFnList{}
return &this
}
// GetFunctions returns the Functions field value if set, zero value otherwise.
func (o *FunctionFnList) GetFunctions() []FunctionFunctionView {
if o == nil || IsNil(o.Functions) {
var ret []FunctionFunctionView
return ret
}
return o.Functions
}
// GetFunctionsOk returns a tuple with the Functions field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *FunctionFnList) GetFunctionsOk() ([]FunctionFunctionView, bool) {
if o == nil || IsNil(o.Functions) {
return nil, false
}
return o.Functions, true
}
// HasFunctions returns a boolean if a field has been set.
func (o *FunctionFnList) HasFunctions() bool {
if o != nil && !IsNil(o.Functions) {
return true
}
return false
}
// SetFunctions gets a reference to the given []FunctionFunctionView and assigns it to the Functions field.
func (o *FunctionFnList) SetFunctions(v []FunctionFunctionView) {
o.Functions = v
}
func (o FunctionFnList) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o FunctionFnList) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Functions) {
toSerialize["functions"] = o.Functions
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *FunctionFnList) UnmarshalJSON(data []byte) (err error) {
varFunctionFnList := _FunctionFnList{}
err = json.Unmarshal(data, &varFunctionFnList)
if err != nil {
return err
}
*o = FunctionFnList(varFunctionFnList)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "functions")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableFunctionFnList struct {
value *FunctionFnList
isSet bool
}
func (v NullableFunctionFnList) Get() *FunctionFnList {
return v.value
}
func (v *NullableFunctionFnList) Set(val *FunctionFnList) {
v.value = val
v.isSet = true
}
func (v NullableFunctionFnList) IsSet() bool {
return v.isSet
}
func (v *NullableFunctionFnList) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableFunctionFnList(val *FunctionFnList) *NullableFunctionFnList {
return &NullableFunctionFnList{value: val, isSet: true}
}
func (v NullableFunctionFnList) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableFunctionFnList) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}