187 lines
4.6 KiB
Go
187 lines
4.6 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"
|
|
)
|
|
|
|
// IndexExpression Represents indexing into an array
|
|
type IndexExpression struct {
|
|
// Type of AST node
|
|
Type *string `json:"type,omitempty"`
|
|
Array *Expression `json:"array,omitempty"`
|
|
Index *Expression `json:"index,omitempty"`
|
|
}
|
|
|
|
// NewIndexExpression instantiates a new IndexExpression 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 NewIndexExpression() *IndexExpression {
|
|
this := IndexExpression{}
|
|
return &this
|
|
}
|
|
|
|
// NewIndexExpressionWithDefaults instantiates a new IndexExpression 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 NewIndexExpressionWithDefaults() *IndexExpression {
|
|
this := IndexExpression{}
|
|
return &this
|
|
}
|
|
|
|
// GetType returns the Type field value if set, zero value otherwise.
|
|
func (o *IndexExpression) 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 *IndexExpression) 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 *IndexExpression) 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 *IndexExpression) SetType(v string) {
|
|
o.Type = &v
|
|
}
|
|
|
|
// GetArray returns the Array field value if set, zero value otherwise.
|
|
func (o *IndexExpression) GetArray() Expression {
|
|
if o == nil || o.Array == nil {
|
|
var ret Expression
|
|
return ret
|
|
}
|
|
return *o.Array
|
|
}
|
|
|
|
// GetArrayOk returns a tuple with the Array field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *IndexExpression) GetArrayOk() (*Expression, bool) {
|
|
if o == nil || o.Array == nil {
|
|
return nil, false
|
|
}
|
|
return o.Array, true
|
|
}
|
|
|
|
// HasArray returns a boolean if a field has been set.
|
|
func (o *IndexExpression) HasArray() bool {
|
|
if o != nil && o.Array != nil {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetArray gets a reference to the given Expression and assigns it to the Array field.
|
|
func (o *IndexExpression) SetArray(v Expression) {
|
|
o.Array = &v
|
|
}
|
|
|
|
// GetIndex returns the Index field value if set, zero value otherwise.
|
|
func (o *IndexExpression) GetIndex() Expression {
|
|
if o == nil || o.Index == nil {
|
|
var ret Expression
|
|
return ret
|
|
}
|
|
return *o.Index
|
|
}
|
|
|
|
// GetIndexOk returns a tuple with the Index field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *IndexExpression) GetIndexOk() (*Expression, bool) {
|
|
if o == nil || o.Index == nil {
|
|
return nil, false
|
|
}
|
|
return o.Index, true
|
|
}
|
|
|
|
// HasIndex returns a boolean if a field has been set.
|
|
func (o *IndexExpression) HasIndex() bool {
|
|
if o != nil && o.Index != nil {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetIndex gets a reference to the given Expression and assigns it to the Index field.
|
|
func (o *IndexExpression) SetIndex(v Expression) {
|
|
o.Index = &v
|
|
}
|
|
|
|
func (o IndexExpression) MarshalJSON() ([]byte, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if o.Type != nil {
|
|
toSerialize["type"] = o.Type
|
|
}
|
|
if o.Array != nil {
|
|
toSerialize["array"] = o.Array
|
|
}
|
|
if o.Index != nil {
|
|
toSerialize["index"] = o.Index
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
type NullableIndexExpression struct {
|
|
value *IndexExpression
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableIndexExpression) Get() *IndexExpression {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableIndexExpression) Set(val *IndexExpression) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableIndexExpression) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableIndexExpression) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableIndexExpression(val *IndexExpression) *NullableIndexExpression {
|
|
return &NullableIndexExpression{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableIndexExpression) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableIndexExpression) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|