Files
sdk/model_function_trigger_list.go

155 lines
4.2 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 FunctionTriggerList type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &FunctionTriggerList{}
// FunctionTriggerList struct for FunctionTriggerList
type FunctionTriggerList struct {
// Triggers is one row per function, describing how it is reached.
Triggers []FunctionTriggerView `json:"triggers,omitempty"`
AdditionalProperties map[string]interface{}
}
type _FunctionTriggerList FunctionTriggerList
// NewFunctionTriggerList instantiates a new FunctionTriggerList 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 NewFunctionTriggerList() *FunctionTriggerList {
this := FunctionTriggerList{}
return &this
}
// NewFunctionTriggerListWithDefaults instantiates a new FunctionTriggerList 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 NewFunctionTriggerListWithDefaults() *FunctionTriggerList {
this := FunctionTriggerList{}
return &this
}
// GetTriggers returns the Triggers field value if set, zero value otherwise.
func (o *FunctionTriggerList) GetTriggers() []FunctionTriggerView {
if o == nil || IsNil(o.Triggers) {
var ret []FunctionTriggerView
return ret
}
return o.Triggers
}
// GetTriggersOk returns a tuple with the Triggers field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *FunctionTriggerList) GetTriggersOk() ([]FunctionTriggerView, bool) {
if o == nil || IsNil(o.Triggers) {
return nil, false
}
return o.Triggers, true
}
// HasTriggers returns a boolean if a field has been set.
func (o *FunctionTriggerList) HasTriggers() bool {
if o != nil && !IsNil(o.Triggers) {
return true
}
return false
}
// SetTriggers gets a reference to the given []FunctionTriggerView and assigns it to the Triggers field.
func (o *FunctionTriggerList) SetTriggers(v []FunctionTriggerView) {
o.Triggers = v
}
func (o FunctionTriggerList) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o FunctionTriggerList) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Triggers) {
toSerialize["triggers"] = o.Triggers
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *FunctionTriggerList) UnmarshalJSON(data []byte) (err error) {
varFunctionTriggerList := _FunctionTriggerList{}
err = json.Unmarshal(data, &varFunctionTriggerList)
if err != nil {
return err
}
*o = FunctionTriggerList(varFunctionTriggerList)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "triggers")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableFunctionTriggerList struct {
value *FunctionTriggerList
isSet bool
}
func (v NullableFunctionTriggerList) Get() *FunctionTriggerList {
return v.value
}
func (v *NullableFunctionTriggerList) Set(val *FunctionTriggerList) {
v.value = val
v.isSet = true
}
func (v NullableFunctionTriggerList) IsSet() bool {
return v.isSet
}
func (v *NullableFunctionTriggerList) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableFunctionTriggerList(val *FunctionTriggerList) *NullableFunctionTriggerList {
return &NullableFunctionTriggerList{value: val, isSet: true}
}
func (v NullableFunctionTriggerList) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableFunctionTriggerList) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}