/* * 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" ) // ConditionalExpression Selects one of two expressions, `Alternate` or `Consequent`, depending on a third boolean expression, `Test` type ConditionalExpression struct { // Type of AST node Type *string `json:"type,omitempty"` Test *Expression `json:"test,omitempty"` Alternate *Expression `json:"alternate,omitempty"` Consequent *Expression `json:"consequent,omitempty"` } // NewConditionalExpression instantiates a new ConditionalExpression 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 NewConditionalExpression() *ConditionalExpression { this := ConditionalExpression{} return &this } // NewConditionalExpressionWithDefaults instantiates a new ConditionalExpression 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 NewConditionalExpressionWithDefaults() *ConditionalExpression { this := ConditionalExpression{} return &this } // GetType returns the Type field value if set, zero value otherwise. func (o *ConditionalExpression) 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 *ConditionalExpression) 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 *ConditionalExpression) 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 *ConditionalExpression) SetType(v string) { o.Type = &v } // GetTest returns the Test field value if set, zero value otherwise. func (o *ConditionalExpression) GetTest() Expression { if o == nil || o.Test == nil { var ret Expression return ret } return *o.Test } // GetTestOk returns a tuple with the Test field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *ConditionalExpression) GetTestOk() (*Expression, bool) { if o == nil || o.Test == nil { return nil, false } return o.Test, true } // HasTest returns a boolean if a field has been set. func (o *ConditionalExpression) HasTest() bool { if o != nil && o.Test != nil { return true } return false } // SetTest gets a reference to the given Expression and assigns it to the Test field. func (o *ConditionalExpression) SetTest(v Expression) { o.Test = &v } // GetAlternate returns the Alternate field value if set, zero value otherwise. func (o *ConditionalExpression) GetAlternate() Expression { if o == nil || o.Alternate == nil { var ret Expression return ret } return *o.Alternate } // GetAlternateOk returns a tuple with the Alternate field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *ConditionalExpression) GetAlternateOk() (*Expression, bool) { if o == nil || o.Alternate == nil { return nil, false } return o.Alternate, true } // HasAlternate returns a boolean if a field has been set. func (o *ConditionalExpression) HasAlternate() bool { if o != nil && o.Alternate != nil { return true } return false } // SetAlternate gets a reference to the given Expression and assigns it to the Alternate field. func (o *ConditionalExpression) SetAlternate(v Expression) { o.Alternate = &v } // GetConsequent returns the Consequent field value if set, zero value otherwise. func (o *ConditionalExpression) GetConsequent() Expression { if o == nil || o.Consequent == nil { var ret Expression return ret } return *o.Consequent } // GetConsequentOk returns a tuple with the Consequent field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *ConditionalExpression) GetConsequentOk() (*Expression, bool) { if o == nil || o.Consequent == nil { return nil, false } return o.Consequent, true } // HasConsequent returns a boolean if a field has been set. func (o *ConditionalExpression) HasConsequent() bool { if o != nil && o.Consequent != nil { return true } return false } // SetConsequent gets a reference to the given Expression and assigns it to the Consequent field. func (o *ConditionalExpression) SetConsequent(v Expression) { o.Consequent = &v } func (o ConditionalExpression) MarshalJSON() ([]byte, error) { toSerialize := map[string]interface{}{} if o.Type != nil { toSerialize["type"] = o.Type } if o.Test != nil { toSerialize["test"] = o.Test } if o.Alternate != nil { toSerialize["alternate"] = o.Alternate } if o.Consequent != nil { toSerialize["consequent"] = o.Consequent } return json.Marshal(toSerialize) } type NullableConditionalExpression struct { value *ConditionalExpression isSet bool } func (v NullableConditionalExpression) Get() *ConditionalExpression { return v.value } func (v *NullableConditionalExpression) Set(val *ConditionalExpression) { v.value = val v.isSet = true } func (v NullableConditionalExpression) IsSet() bool { return v.isSet } func (v *NullableConditionalExpression) Unset() { v.value = nil v.isSet = false } func NewNullableConditionalExpression(val *ConditionalExpression) *NullableConditionalExpression { return &NullableConditionalExpression{value: val, isSet: true} } func (v NullableConditionalExpression) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableConditionalExpression) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) }