/* * 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" ) // ParenExpression Represents an expression wrapped in parenthesis type ParenExpression struct { // Type of AST node Type *string `json:"type,omitempty"` Expression *Expression `json:"expression,omitempty"` } // NewParenExpression instantiates a new ParenExpression 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 NewParenExpression() *ParenExpression { this := ParenExpression{} return &this } // NewParenExpressionWithDefaults instantiates a new ParenExpression 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 NewParenExpressionWithDefaults() *ParenExpression { this := ParenExpression{} return &this } // GetType returns the Type field value if set, zero value otherwise. func (o *ParenExpression) 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 *ParenExpression) 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 *ParenExpression) 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 *ParenExpression) SetType(v string) { o.Type = &v } // GetExpression returns the Expression field value if set, zero value otherwise. func (o *ParenExpression) GetExpression() Expression { if o == nil || o.Expression == nil { var ret Expression return ret } return *o.Expression } // GetExpressionOk returns a tuple with the Expression field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *ParenExpression) GetExpressionOk() (*Expression, bool) { if o == nil || o.Expression == nil { return nil, false } return o.Expression, true } // HasExpression returns a boolean if a field has been set. func (o *ParenExpression) HasExpression() bool { if o != nil && o.Expression != nil { return true } return false } // SetExpression gets a reference to the given Expression and assigns it to the Expression field. func (o *ParenExpression) SetExpression(v Expression) { o.Expression = &v } func (o ParenExpression) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Type != nil { toSerialize["type"] = o.Type } if o.Expression != nil { toSerialize["expression"] = o.Expression } return json.Marshal(toSerialize) } type NullableParenExpression struct { value *ParenExpression isSet bool } func (v NullableParenExpression) Get() *ParenExpression { return v.value } func (v *NullableParenExpression) Set(val *ParenExpression) { v.value = val v.isSet = true } func (v NullableParenExpression) IsSet() bool { return v.isSet } func (v *NullableParenExpression) Unset() { v.value = nil v.isSet = false } func NewNullableParenExpression(val *ParenExpression) *NullableParenExpression { return &NullableParenExpression{value: val, isSet: true} } func (v NullableParenExpression) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableParenExpression) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) }