model_expression_config.go•3.5 kB
/*
Metoro API
API for managing Metoro environments, alerts, and dashboards.
API version: 1.0.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package model
import (
"encoding/json"
)
// checks if the ExpressionConfig type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &ExpressionConfig{}
// ExpressionConfig struct for ExpressionConfig
type ExpressionConfig struct {
MetoroQLTimeseries *MetoroQlTimeseries `json:"metoroQLTimeseries,omitempty"`
}
// NewExpressionConfig instantiates a new ExpressionConfig 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 NewExpressionConfig() *ExpressionConfig {
this := ExpressionConfig{}
return &this
}
// NewExpressionConfigWithDefaults instantiates a new ExpressionConfig 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 NewExpressionConfigWithDefaults() *ExpressionConfig {
this := ExpressionConfig{}
return &this
}
// GetMetoroQLTimeseries returns the MetoroQLTimeseries field value if set, zero value otherwise.
func (o *ExpressionConfig) GetMetoroQLTimeseries() MetoroQlTimeseries {
if o == nil || IsNil(o.MetoroQLTimeseries) {
var ret MetoroQlTimeseries
return ret
}
return *o.MetoroQLTimeseries
}
// GetMetoroQLTimeseriesOk returns a tuple with the MetoroQLTimeseries field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ExpressionConfig) GetMetoroQLTimeseriesOk() (*MetoroQlTimeseries, bool) {
if o == nil || IsNil(o.MetoroQLTimeseries) {
return nil, false
}
return o.MetoroQLTimeseries, true
}
// HasMetoroQLTimeseries returns a boolean if a field has been set.
func (o *ExpressionConfig) HasMetoroQLTimeseries() bool {
if o != nil && !IsNil(o.MetoroQLTimeseries) {
return true
}
return false
}
// SetMetoroQLTimeseries gets a reference to the given MetoroQlTimeseries and assigns it to the MetoroQLTimeseries field.
func (o *ExpressionConfig) SetMetoroQLTimeseries(v MetoroQlTimeseries) {
o.MetoroQLTimeseries = &v
}
func (o ExpressionConfig) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o ExpressionConfig) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.MetoroQLTimeseries) {
toSerialize["metoroQLTimeseries"] = o.MetoroQLTimeseries
}
return toSerialize, nil
}
type NullableExpressionConfig struct {
value *ExpressionConfig
isSet bool
}
func (v NullableExpressionConfig) Get() *ExpressionConfig {
return v.value
}
func (v *NullableExpressionConfig) Set(val *ExpressionConfig) {
v.value = val
v.isSet = true
}
func (v NullableExpressionConfig) IsSet() bool {
return v.isSet
}
func (v *NullableExpressionConfig) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableExpressionConfig(val *ExpressionConfig) *NullableExpressionConfig {
return &NullableExpressionConfig{value: val, isSet: true}
}
func (v NullableExpressionConfig) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableExpressionConfig) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}