187 lines
4.7 KiB
Go
187 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"
|
|
)
|
|
|
|
// UnaryExpression Uses operators to act on a single operand in an expression
|
|
type UnaryExpression struct {
|
|
// Type of AST node
|
|
Type *string `json:"type,omitempty"`
|
|
Operator *string `json:"operator,omitempty"`
|
|
Argument *Expression `json:"argument,omitempty"`
|
|
}
|
|
|
|
// NewUnaryExpression instantiates a new UnaryExpression 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 NewUnaryExpression() *UnaryExpression {
|
|
this := UnaryExpression{}
|
|
return &this
|
|
}
|
|
|
|
// NewUnaryExpressionWithDefaults instantiates a new UnaryExpression 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 NewUnaryExpressionWithDefaults() *UnaryExpression {
|
|
this := UnaryExpression{}
|
|
return &this
|
|
}
|
|
|
|
// GetType returns the Type field value if set, zero value otherwise.
|
|
func (o *UnaryExpression) 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 *UnaryExpression) 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 *UnaryExpression) 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 *UnaryExpression) SetType(v string) {
|
|
o.Type = &v
|
|
}
|
|
|
|
// GetOperator returns the Operator field value if set, zero value otherwise.
|
|
func (o *UnaryExpression) 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 *UnaryExpression) 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 *UnaryExpression) 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 *UnaryExpression) SetOperator(v string) {
|
|
o.Operator = &v
|
|
}
|
|
|
|
// GetArgument returns the Argument field value if set, zero value otherwise.
|
|
func (o *UnaryExpression) GetArgument() Expression {
|
|
if o == nil || o.Argument == nil {
|
|
var ret Expression
|
|
return ret
|
|
}
|
|
return *o.Argument
|
|
}
|
|
|
|
// GetArgumentOk returns a tuple with the Argument field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *UnaryExpression) GetArgumentOk() (*Expression, bool) {
|
|
if o == nil || o.Argument == nil {
|
|
return nil, false
|
|
}
|
|
return o.Argument, true
|
|
}
|
|
|
|
// HasArgument returns a boolean if a field has been set.
|
|
func (o *UnaryExpression) HasArgument() bool {
|
|
if o != nil && o.Argument != nil {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetArgument gets a reference to the given Expression and assigns it to the Argument field.
|
|
func (o *UnaryExpression) SetArgument(v Expression) {
|
|
o.Argument = &v
|
|
}
|
|
|
|
func (o UnaryExpression) 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.Argument != nil {
|
|
toSerialize["argument"] = o.Argument
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
type NullableUnaryExpression struct {
|
|
value *UnaryExpression
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableUnaryExpression) Get() *UnaryExpression {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableUnaryExpression) Set(val *UnaryExpression) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableUnaryExpression) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableUnaryExpression) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableUnaryExpression(val *UnaryExpression) *NullableUnaryExpression {
|
|
return &NullableUnaryExpression{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableUnaryExpression) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableUnaryExpression) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|