mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
155 lines
4.4 KiB
Go
155 lines
4.4 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 FunctionInvocationList type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &FunctionInvocationList{}
|
|
|
|
// FunctionInvocationList struct for FunctionInvocationList
|
|
type FunctionInvocationList struct {
|
|
// Invocations is one row per past run, newest first.
|
|
Invocations []FunctionInvocationView `json:"invocations,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _FunctionInvocationList FunctionInvocationList
|
|
|
|
// NewFunctionInvocationList instantiates a new FunctionInvocationList 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 NewFunctionInvocationList() *FunctionInvocationList {
|
|
this := FunctionInvocationList{}
|
|
return &this
|
|
}
|
|
|
|
// NewFunctionInvocationListWithDefaults instantiates a new FunctionInvocationList 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 NewFunctionInvocationListWithDefaults() *FunctionInvocationList {
|
|
this := FunctionInvocationList{}
|
|
return &this
|
|
}
|
|
|
|
// GetInvocations returns the Invocations field value if set, zero value otherwise.
|
|
func (o *FunctionInvocationList) GetInvocations() []FunctionInvocationView {
|
|
if o == nil || IsNil(o.Invocations) {
|
|
var ret []FunctionInvocationView
|
|
return ret
|
|
}
|
|
return o.Invocations
|
|
}
|
|
|
|
// GetInvocationsOk returns a tuple with the Invocations field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *FunctionInvocationList) GetInvocationsOk() ([]FunctionInvocationView, bool) {
|
|
if o == nil || IsNil(o.Invocations) {
|
|
return nil, false
|
|
}
|
|
return o.Invocations, true
|
|
}
|
|
|
|
// HasInvocations returns a boolean if a field has been set.
|
|
func (o *FunctionInvocationList) HasInvocations() bool {
|
|
if o != nil && !IsNil(o.Invocations) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetInvocations gets a reference to the given []FunctionInvocationView and assigns it to the Invocations field.
|
|
func (o *FunctionInvocationList) SetInvocations(v []FunctionInvocationView) {
|
|
o.Invocations = v
|
|
}
|
|
|
|
func (o FunctionInvocationList) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o FunctionInvocationList) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Invocations) {
|
|
toSerialize["invocations"] = o.Invocations
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *FunctionInvocationList) UnmarshalJSON(data []byte) (err error) {
|
|
varFunctionInvocationList := _FunctionInvocationList{}
|
|
|
|
err = json.Unmarshal(data, &varFunctionInvocationList)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = FunctionInvocationList(varFunctionInvocationList)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "invocations")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableFunctionInvocationList struct {
|
|
value *FunctionInvocationList
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableFunctionInvocationList) Get() *FunctionInvocationList {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableFunctionInvocationList) Set(val *FunctionInvocationList) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableFunctionInvocationList) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableFunctionInvocationList) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableFunctionInvocationList(val *FunctionInvocationList) *NullableFunctionInvocationList {
|
|
return &NullableFunctionInvocationList{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableFunctionInvocationList) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableFunctionInvocationList) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|