223 lines
5.6 KiB
Go
223 lines
5.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"
|
|
)
|
|
|
|
// BinaryExpression uses binary operators to act on two operands in an expression
|
|
type BinaryExpression struct {
|
|
// Type of AST node
|
|
Type *string `json:"type,omitempty"`
|
|
Operator *string `json:"operator,omitempty"`
|
|
Left *Expression `json:"left,omitempty"`
|
|
Right *Expression `json:"right,omitempty"`
|
|
}
|
|
|
|
// NewBinaryExpression instantiates a new BinaryExpression 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 NewBinaryExpression() *BinaryExpression {
|
|
this := BinaryExpression{}
|
|
return &this
|
|
}
|
|
|
|
// NewBinaryExpressionWithDefaults instantiates a new BinaryExpression 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 NewBinaryExpressionWithDefaults() *BinaryExpression {
|
|
this := BinaryExpression{}
|
|
return &this
|
|
}
|
|
|
|
// GetType returns the Type field value if set, zero value otherwise.
|
|
func (o *BinaryExpression) 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 *BinaryExpression) 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 *BinaryExpression) 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 *BinaryExpression) SetType(v string) {
|
|
o.Type = &v
|
|
}
|
|
|
|
// GetOperator returns the Operator field value if set, zero value otherwise.
|
|
func (o *BinaryExpression) GetOperator() string {
|
|
if o == nil || o.Operator == nil {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Operator
|
|
}
|
|
|
|
// GetOperatorOk returns a tuple with the Operator field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *BinaryExpression) GetOperatorOk() (*string, bool) {
|
|
if o == nil || o.Operator == nil {
|
|
return nil, false
|
|
}
|
|
return o.Operator, true
|
|
}
|
|
|
|
// HasOperator returns a boolean if a field has been set.
|
|
func (o *BinaryExpression) HasOperator() bool {
|
|
if o != nil && o.Operator != nil {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetOperator gets a reference to the given string and assigns it to the Operator field.
|
|
func (o *BinaryExpression) SetOperator(v string) {
|
|
o.Operator = &v
|
|
}
|
|
|
|
// GetLeft returns the Left field value if set, zero value otherwise.
|
|
func (o *BinaryExpression) GetLeft() Expression {
|
|
if o == nil || o.Left == nil {
|
|
var ret Expression
|
|
return ret
|
|
}
|
|
return *o.Left
|
|
}
|
|
|
|
// GetLeftOk returns a tuple with the Left field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *BinaryExpression) GetLeftOk() (*Expression, bool) {
|
|
if o == nil || o.Left == nil {
|
|
return nil, false
|
|
}
|
|
return o.Left, true
|
|
}
|
|
|
|
// HasLeft returns a boolean if a field has been set.
|
|
func (o *BinaryExpression) HasLeft() bool {
|
|
if o != nil && o.Left != nil {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetLeft gets a reference to the given Expression and assigns it to the Left field.
|
|
func (o *BinaryExpression) SetLeft(v Expression) {
|
|
o.Left = &v
|
|
}
|
|
|
|
// GetRight returns the Right field value if set, zero value otherwise.
|
|
func (o *BinaryExpression) GetRight() Expression {
|
|
if o == nil || o.Right == nil {
|
|
var ret Expression
|
|
return ret
|
|
}
|
|
return *o.Right
|
|
}
|
|
|
|
// GetRightOk returns a tuple with the Right field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *BinaryExpression) GetRightOk() (*Expression, bool) {
|
|
if o == nil || o.Right == nil {
|
|
return nil, false
|
|
}
|
|
return o.Right, true
|
|
}
|
|
|
|
// HasRight returns a boolean if a field has been set.
|
|
func (o *BinaryExpression) HasRight() bool {
|
|
if o != nil && o.Right != nil {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetRight gets a reference to the given Expression and assigns it to the Right field.
|
|
func (o *BinaryExpression) SetRight(v Expression) {
|
|
o.Right = &v
|
|
}
|
|
|
|
func (o BinaryExpression) MarshalJSON() ([]byte, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if o.Type != nil {
|
|
toSerialize["type"] = o.Type
|
|
}
|
|
if o.Operator != nil {
|
|
toSerialize["operator"] = o.Operator
|
|
}
|
|
if o.Left != nil {
|
|
toSerialize["left"] = o.Left
|
|
}
|
|
if o.Right != nil {
|
|
toSerialize["right"] = o.Right
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
type NullableBinaryExpression struct {
|
|
value *BinaryExpression
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableBinaryExpression) Get() *BinaryExpression {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableBinaryExpression) Set(val *BinaryExpression) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableBinaryExpression) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableBinaryExpression) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableBinaryExpression(val *BinaryExpression) *NullableBinaryExpression {
|
|
return &NullableBinaryExpression{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableBinaryExpression) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableBinaryExpression) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|