Files
influx-cli/internal/api/model_array_expression.gen.go
2021-05-05 11:01:24 -04:00

152 lines
3.9 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"
)
// ArrayExpression Used to create and directly specify the elements of an array object
type ArrayExpression struct {
// Type of AST node
Type *string `json:"type,omitempty"`
// Elements of the array
Elements *[]Expression `json:"elements,omitempty"`
}
// NewArrayExpression instantiates a new ArrayExpression 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 NewArrayExpression() *ArrayExpression {
this := ArrayExpression{}
return &this
}
// NewArrayExpressionWithDefaults instantiates a new ArrayExpression 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 NewArrayExpressionWithDefaults() *ArrayExpression {
this := ArrayExpression{}
return &this
}
// GetType returns the Type field value if set, zero value otherwise.
func (o *ArrayExpression) 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 *ArrayExpression) 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 *ArrayExpression) 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 *ArrayExpression) SetType(v string) {
o.Type = &v
}
// GetElements returns the Elements field value if set, zero value otherwise.
func (o *ArrayExpression) GetElements() []Expression {
if o == nil || o.Elements == nil {
var ret []Expression
return ret
}
return *o.Elements
}
// GetElementsOk returns a tuple with the Elements field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ArrayExpression) GetElementsOk() (*[]Expression, bool) {
if o == nil || o.Elements == nil {
return nil, false
}
return o.Elements, true
}
// HasElements returns a boolean if a field has been set.
func (o *ArrayExpression) HasElements() bool {
if o != nil && o.Elements != nil {
return true
}
return false
}
// SetElements gets a reference to the given []Expression and assigns it to the Elements field.
func (o *ArrayExpression) SetElements(v []Expression) {
o.Elements = &v
}
func (o ArrayExpression) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if o.Type != nil {
toSerialize["type"] = o.Type
}
if o.Elements != nil {
toSerialize["elements"] = o.Elements
}
return json.Marshal(toSerialize)
}
type NullableArrayExpression struct {
value *ArrayExpression
isSet bool
}
func (v NullableArrayExpression) Get() *ArrayExpression {
return v.value
}
func (v *NullableArrayExpression) Set(val *ArrayExpression) {
v.value = val
v.isSet = true
}
func (v NullableArrayExpression) IsSet() bool {
return v.isSet
}
func (v *NullableArrayExpression) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableArrayExpression(val *ArrayExpression) *NullableArrayExpression {
return &NullableArrayExpression{value: val, isSet: true}
}
func (v NullableArrayExpression) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableArrayExpression) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}