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

223 lines
5.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"
)
// LogicalExpression Represents the rule conditions that collectively evaluate to either true or false
type LogicalExpression 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"`
}
// NewLogicalExpression instantiates a new LogicalExpression 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 NewLogicalExpression() *LogicalExpression {
this := LogicalExpression{}
return &this
}
// NewLogicalExpressionWithDefaults instantiates a new LogicalExpression 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 NewLogicalExpressionWithDefaults() *LogicalExpression {
this := LogicalExpression{}
return &this
}
// GetType returns the Type field value if set, zero value otherwise.
func (o *LogicalExpression) 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 *LogicalExpression) 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 *LogicalExpression) 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 *LogicalExpression) SetType(v string) {
o.Type = &v
}
// GetOperator returns the Operator field value if set, zero value otherwise.
func (o *LogicalExpression) 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 *LogicalExpression) 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 *LogicalExpression) 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 *LogicalExpression) SetOperator(v string) {
o.Operator = &v
}
// GetLeft returns the Left field value if set, zero value otherwise.
func (o *LogicalExpression) 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 *LogicalExpression) 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 *LogicalExpression) 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 *LogicalExpression) SetLeft(v Expression) {
o.Left = &v
}
// GetRight returns the Right field value if set, zero value otherwise.
func (o *LogicalExpression) 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 *LogicalExpression) 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 *LogicalExpression) 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 *LogicalExpression) SetRight(v Expression) {
o.Right = &v
}
func (o LogicalExpression) 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 NullableLogicalExpression struct {
value *LogicalExpression
isSet bool
}
func (v NullableLogicalExpression) Get() *LogicalExpression {
return v.value
}
func (v *NullableLogicalExpression) Set(val *LogicalExpression) {
v.value = val
v.isSet = true
}
func (v NullableLogicalExpression) IsSet() bool {
return v.isSet
}
func (v *NullableLogicalExpression) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableLogicalExpression(val *LogicalExpression) *NullableLogicalExpression {
return &NullableLogicalExpression{value: val, isSet: true}
}
func (v NullableLogicalExpression) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableLogicalExpression) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}