188 lines
4.7 KiB
Go
188 lines
4.7 KiB
Go
/*
|
|
* Subset of Influx API covered by Influx CLI
|
|
*
|
|
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
*
|
|
* API version: 2.0.0
|
|
*/
|
|
|
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
|
|
|
package api
|
|
|
|
import (
|
|
"encoding/json"
|
|
)
|
|
|
|
// FunctionExpression Function expression
|
|
type FunctionExpression struct {
|
|
// Type of AST node
|
|
Type *string `json:"type,omitempty"`
|
|
// Function parameters
|
|
Params *[]Property `json:"params,omitempty"`
|
|
Body *Node `json:"body,omitempty"`
|
|
}
|
|
|
|
// NewFunctionExpression instantiates a new FunctionExpression 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 NewFunctionExpression() *FunctionExpression {
|
|
this := FunctionExpression{}
|
|
return &this
|
|
}
|
|
|
|
// NewFunctionExpressionWithDefaults instantiates a new FunctionExpression 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 NewFunctionExpressionWithDefaults() *FunctionExpression {
|
|
this := FunctionExpression{}
|
|
return &this
|
|
}
|
|
|
|
// GetType returns the Type field value if set, zero value otherwise.
|
|
func (o *FunctionExpression) GetType() string {
|
|
if o == nil || o.Type == nil {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Type
|
|
}
|
|
|
|
// GetTypeOk returns a tuple with the Type field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *FunctionExpression) GetTypeOk() (*string, bool) {
|
|
if o == nil || o.Type == nil {
|
|
return nil, false
|
|
}
|
|
return o.Type, true
|
|
}
|
|
|
|
// HasType returns a boolean if a field has been set.
|
|
func (o *FunctionExpression) HasType() bool {
|
|
if o != nil && o.Type != nil {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetType gets a reference to the given string and assigns it to the Type field.
|
|
func (o *FunctionExpression) SetType(v string) {
|
|
o.Type = &v
|
|
}
|
|
|
|
// GetParams returns the Params field value if set, zero value otherwise.
|
|
func (o *FunctionExpression) GetParams() []Property {
|
|
if o == nil || o.Params == nil {
|
|
var ret []Property
|
|
return ret
|
|
}
|
|
return *o.Params
|
|
}
|
|
|
|
// GetParamsOk returns a tuple with the Params field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *FunctionExpression) GetParamsOk() (*[]Property, bool) {
|
|
if o == nil || o.Params == nil {
|
|
return nil, false
|
|
}
|
|
return o.Params, true
|
|
}
|
|
|
|
// HasParams returns a boolean if a field has been set.
|
|
func (o *FunctionExpression) HasParams() bool {
|
|
if o != nil && o.Params != nil {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetParams gets a reference to the given []Property and assigns it to the Params field.
|
|
func (o *FunctionExpression) SetParams(v []Property) {
|
|
o.Params = &v
|
|
}
|
|
|
|
// GetBody returns the Body field value if set, zero value otherwise.
|
|
func (o *FunctionExpression) GetBody() Node {
|
|
if o == nil || o.Body == nil {
|
|
var ret Node
|
|
return ret
|
|
}
|
|
return *o.Body
|
|
}
|
|
|
|
// GetBodyOk returns a tuple with the Body field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *FunctionExpression) GetBodyOk() (*Node, bool) {
|
|
if o == nil || o.Body == nil {
|
|
return nil, false
|
|
}
|
|
return o.Body, true
|
|
}
|
|
|
|
// HasBody returns a boolean if a field has been set.
|
|
func (o *FunctionExpression) HasBody() bool {
|
|
if o != nil && o.Body != nil {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetBody gets a reference to the given Node and assigns it to the Body field.
|
|
func (o *FunctionExpression) SetBody(v Node) {
|
|
o.Body = &v
|
|
}
|
|
|
|
func (o FunctionExpression) MarshalJSON() ([]byte, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if o.Type != nil {
|
|
toSerialize["type"] = o.Type
|
|
}
|
|
if o.Params != nil {
|
|
toSerialize["params"] = o.Params
|
|
}
|
|
if o.Body != nil {
|
|
toSerialize["body"] = o.Body
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
type NullableFunctionExpression struct {
|
|
value *FunctionExpression
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableFunctionExpression) Get() *FunctionExpression {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableFunctionExpression) Set(val *FunctionExpression) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableFunctionExpression) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableFunctionExpression) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableFunctionExpression(val *FunctionExpression) *NullableFunctionExpression {
|
|
return &NullableFunctionExpression{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableFunctionExpression) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableFunctionExpression) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|