mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
228 lines
5.7 KiB
Go
228 lines
5.7 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 O11yFunction type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &O11yFunction{}
|
|
|
|
// O11yFunction struct for O11yFunction
|
|
type O11yFunction struct {
|
|
Args []interface{} `json:"args,omitempty"`
|
|
Name *string `json:"name,omitempty"`
|
|
NamedArgs map[string]interface{} `json:"namedArgs,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _O11yFunction O11yFunction
|
|
|
|
// NewO11yFunction instantiates a new O11yFunction 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 NewO11yFunction() *O11yFunction {
|
|
this := O11yFunction{}
|
|
return &this
|
|
}
|
|
|
|
// NewO11yFunctionWithDefaults instantiates a new O11yFunction 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 NewO11yFunctionWithDefaults() *O11yFunction {
|
|
this := O11yFunction{}
|
|
return &this
|
|
}
|
|
|
|
// GetArgs returns the Args field value if set, zero value otherwise.
|
|
func (o *O11yFunction) GetArgs() []interface{} {
|
|
if o == nil || IsNil(o.Args) {
|
|
var ret []interface{}
|
|
return ret
|
|
}
|
|
return o.Args
|
|
}
|
|
|
|
// GetArgsOk returns a tuple with the Args field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *O11yFunction) GetArgsOk() ([]interface{}, bool) {
|
|
if o == nil || IsNil(o.Args) {
|
|
return nil, false
|
|
}
|
|
return o.Args, true
|
|
}
|
|
|
|
// HasArgs returns a boolean if a field has been set.
|
|
func (o *O11yFunction) HasArgs() bool {
|
|
if o != nil && !IsNil(o.Args) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetArgs gets a reference to the given []interface{} and assigns it to the Args field.
|
|
func (o *O11yFunction) SetArgs(v []interface{}) {
|
|
o.Args = v
|
|
}
|
|
|
|
// GetName returns the Name field value if set, zero value otherwise.
|
|
func (o *O11yFunction) GetName() string {
|
|
if o == nil || IsNil(o.Name) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Name
|
|
}
|
|
|
|
// GetNameOk returns a tuple with the Name field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *O11yFunction) GetNameOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Name) {
|
|
return nil, false
|
|
}
|
|
return o.Name, true
|
|
}
|
|
|
|
// HasName returns a boolean if a field has been set.
|
|
func (o *O11yFunction) HasName() bool {
|
|
if o != nil && !IsNil(o.Name) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetName gets a reference to the given string and assigns it to the Name field.
|
|
func (o *O11yFunction) SetName(v string) {
|
|
o.Name = &v
|
|
}
|
|
|
|
// GetNamedArgs returns the NamedArgs field value if set, zero value otherwise.
|
|
func (o *O11yFunction) GetNamedArgs() map[string]interface{} {
|
|
if o == nil || IsNil(o.NamedArgs) {
|
|
var ret map[string]interface{}
|
|
return ret
|
|
}
|
|
return o.NamedArgs
|
|
}
|
|
|
|
// GetNamedArgsOk returns a tuple with the NamedArgs field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *O11yFunction) GetNamedArgsOk() (map[string]interface{}, bool) {
|
|
if o == nil || IsNil(o.NamedArgs) {
|
|
return map[string]interface{}{}, false
|
|
}
|
|
return o.NamedArgs, true
|
|
}
|
|
|
|
// HasNamedArgs returns a boolean if a field has been set.
|
|
func (o *O11yFunction) HasNamedArgs() bool {
|
|
if o != nil && !IsNil(o.NamedArgs) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetNamedArgs gets a reference to the given map[string]interface{} and assigns it to the NamedArgs field.
|
|
func (o *O11yFunction) SetNamedArgs(v map[string]interface{}) {
|
|
o.NamedArgs = v
|
|
}
|
|
|
|
func (o O11yFunction) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o O11yFunction) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Args) {
|
|
toSerialize["args"] = o.Args
|
|
}
|
|
if !IsNil(o.Name) {
|
|
toSerialize["name"] = o.Name
|
|
}
|
|
if !IsNil(o.NamedArgs) {
|
|
toSerialize["namedArgs"] = o.NamedArgs
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *O11yFunction) UnmarshalJSON(data []byte) (err error) {
|
|
varO11yFunction := _O11yFunction{}
|
|
|
|
err = json.Unmarshal(data, &varO11yFunction)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = O11yFunction(varO11yFunction)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "args")
|
|
delete(additionalProperties, "name")
|
|
delete(additionalProperties, "namedArgs")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableO11yFunction struct {
|
|
value *O11yFunction
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableO11yFunction) Get() *O11yFunction {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableO11yFunction) Set(val *O11yFunction) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableO11yFunction) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableO11yFunction) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableO11yFunction(val *O11yFunction) *NullableO11yFunction {
|
|
return &NullableO11yFunction{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableO11yFunction) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableO11yFunction) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|