Files
sdk/model_o11y_builder_query.go

1042 lines
30 KiB
Go

/*
Hanzo Cloud API
The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
API version: v1
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package hanzoai
import (
"encoding/json"
)
// checks if the O11yBuilderQuery type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &O11yBuilderQuery{}
// O11yBuilderQuery struct for O11yBuilderQuery
type O11yBuilderQuery struct {
IsAnomaly *bool `json:"IsAnomaly,omitempty"`
QueriesUsedInFormula []string `json:"QueriesUsedInFormula,omitempty"`
ShiftBy *int64 `json:"ShiftBy,omitempty"`
AggregateAttribute *O11yAttributeKey `json:"aggregateAttribute,omitempty"`
AggregateOperator *string `json:"aggregateOperator,omitempty"`
DataSource *string `json:"dataSource,omitempty"`
Disabled *bool `json:"disabled,omitempty"`
Expression *string `json:"expression,omitempty"`
Filters *O11yFilterSet `json:"filters,omitempty"`
Functions []O11yFunction `json:"functions,omitempty"`
GroupBy []O11yAttributeKey `json:"groupBy,omitempty"`
Having []O11yHaving `json:"having,omitempty"`
Legend *string `json:"legend,omitempty"`
Limit *int32 `json:"limit,omitempty"`
Offset *int32 `json:"offset,omitempty"`
OrderBy []O11yOrderBy `json:"orderBy,omitempty"`
PageSize *int32 `json:"pageSize,omitempty"`
QueryName *string `json:"queryName,omitempty"`
ReduceTo *string `json:"reduceTo,omitempty"`
SelectColumns []O11yAttributeKey `json:"selectColumns,omitempty"`
SeriesAggregation *string `json:"seriesAggregation,omitempty"`
SpaceAggregation *string `json:"spaceAggregation,omitempty"`
StepInterval *int64 `json:"stepInterval,omitempty"`
Temporality *string `json:"temporality,omitempty"`
TimeAggregation *string `json:"timeAggregation,omitempty"`
AdditionalProperties map[string]interface{}
}
type _O11yBuilderQuery O11yBuilderQuery
// NewO11yBuilderQuery instantiates a new O11yBuilderQuery 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 NewO11yBuilderQuery() *O11yBuilderQuery {
this := O11yBuilderQuery{}
return &this
}
// NewO11yBuilderQueryWithDefaults instantiates a new O11yBuilderQuery 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 NewO11yBuilderQueryWithDefaults() *O11yBuilderQuery {
this := O11yBuilderQuery{}
return &this
}
// GetIsAnomaly returns the IsAnomaly field value if set, zero value otherwise.
func (o *O11yBuilderQuery) GetIsAnomaly() bool {
if o == nil || IsNil(o.IsAnomaly) {
var ret bool
return ret
}
return *o.IsAnomaly
}
// GetIsAnomalyOk returns a tuple with the IsAnomaly field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *O11yBuilderQuery) GetIsAnomalyOk() (*bool, bool) {
if o == nil || IsNil(o.IsAnomaly) {
return nil, false
}
return o.IsAnomaly, true
}
// HasIsAnomaly returns a boolean if a field has been set.
func (o *O11yBuilderQuery) HasIsAnomaly() bool {
if o != nil && !IsNil(o.IsAnomaly) {
return true
}
return false
}
// SetIsAnomaly gets a reference to the given bool and assigns it to the IsAnomaly field.
func (o *O11yBuilderQuery) SetIsAnomaly(v bool) {
o.IsAnomaly = &v
}
// GetQueriesUsedInFormula returns the QueriesUsedInFormula field value if set, zero value otherwise.
func (o *O11yBuilderQuery) GetQueriesUsedInFormula() []string {
if o == nil || IsNil(o.QueriesUsedInFormula) {
var ret []string
return ret
}
return o.QueriesUsedInFormula
}
// GetQueriesUsedInFormulaOk returns a tuple with the QueriesUsedInFormula field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *O11yBuilderQuery) GetQueriesUsedInFormulaOk() ([]string, bool) {
if o == nil || IsNil(o.QueriesUsedInFormula) {
return nil, false
}
return o.QueriesUsedInFormula, true
}
// HasQueriesUsedInFormula returns a boolean if a field has been set.
func (o *O11yBuilderQuery) HasQueriesUsedInFormula() bool {
if o != nil && !IsNil(o.QueriesUsedInFormula) {
return true
}
return false
}
// SetQueriesUsedInFormula gets a reference to the given []string and assigns it to the QueriesUsedInFormula field.
func (o *O11yBuilderQuery) SetQueriesUsedInFormula(v []string) {
o.QueriesUsedInFormula = v
}
// GetShiftBy returns the ShiftBy field value if set, zero value otherwise.
func (o *O11yBuilderQuery) GetShiftBy() int64 {
if o == nil || IsNil(o.ShiftBy) {
var ret int64
return ret
}
return *o.ShiftBy
}
// GetShiftByOk returns a tuple with the ShiftBy field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *O11yBuilderQuery) GetShiftByOk() (*int64, bool) {
if o == nil || IsNil(o.ShiftBy) {
return nil, false
}
return o.ShiftBy, true
}
// HasShiftBy returns a boolean if a field has been set.
func (o *O11yBuilderQuery) HasShiftBy() bool {
if o != nil && !IsNil(o.ShiftBy) {
return true
}
return false
}
// SetShiftBy gets a reference to the given int64 and assigns it to the ShiftBy field.
func (o *O11yBuilderQuery) SetShiftBy(v int64) {
o.ShiftBy = &v
}
// GetAggregateAttribute returns the AggregateAttribute field value if set, zero value otherwise.
func (o *O11yBuilderQuery) GetAggregateAttribute() O11yAttributeKey {
if o == nil || IsNil(o.AggregateAttribute) {
var ret O11yAttributeKey
return ret
}
return *o.AggregateAttribute
}
// GetAggregateAttributeOk returns a tuple with the AggregateAttribute field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *O11yBuilderQuery) GetAggregateAttributeOk() (*O11yAttributeKey, bool) {
if o == nil || IsNil(o.AggregateAttribute) {
return nil, false
}
return o.AggregateAttribute, true
}
// HasAggregateAttribute returns a boolean if a field has been set.
func (o *O11yBuilderQuery) HasAggregateAttribute() bool {
if o != nil && !IsNil(o.AggregateAttribute) {
return true
}
return false
}
// SetAggregateAttribute gets a reference to the given O11yAttributeKey and assigns it to the AggregateAttribute field.
func (o *O11yBuilderQuery) SetAggregateAttribute(v O11yAttributeKey) {
o.AggregateAttribute = &v
}
// GetAggregateOperator returns the AggregateOperator field value if set, zero value otherwise.
func (o *O11yBuilderQuery) GetAggregateOperator() string {
if o == nil || IsNil(o.AggregateOperator) {
var ret string
return ret
}
return *o.AggregateOperator
}
// GetAggregateOperatorOk returns a tuple with the AggregateOperator field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *O11yBuilderQuery) GetAggregateOperatorOk() (*string, bool) {
if o == nil || IsNil(o.AggregateOperator) {
return nil, false
}
return o.AggregateOperator, true
}
// HasAggregateOperator returns a boolean if a field has been set.
func (o *O11yBuilderQuery) HasAggregateOperator() bool {
if o != nil && !IsNil(o.AggregateOperator) {
return true
}
return false
}
// SetAggregateOperator gets a reference to the given string and assigns it to the AggregateOperator field.
func (o *O11yBuilderQuery) SetAggregateOperator(v string) {
o.AggregateOperator = &v
}
// GetDataSource returns the DataSource field value if set, zero value otherwise.
func (o *O11yBuilderQuery) GetDataSource() string {
if o == nil || IsNil(o.DataSource) {
var ret string
return ret
}
return *o.DataSource
}
// GetDataSourceOk returns a tuple with the DataSource field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *O11yBuilderQuery) GetDataSourceOk() (*string, bool) {
if o == nil || IsNil(o.DataSource) {
return nil, false
}
return o.DataSource, true
}
// HasDataSource returns a boolean if a field has been set.
func (o *O11yBuilderQuery) HasDataSource() bool {
if o != nil && !IsNil(o.DataSource) {
return true
}
return false
}
// SetDataSource gets a reference to the given string and assigns it to the DataSource field.
func (o *O11yBuilderQuery) SetDataSource(v string) {
o.DataSource = &v
}
// GetDisabled returns the Disabled field value if set, zero value otherwise.
func (o *O11yBuilderQuery) GetDisabled() bool {
if o == nil || IsNil(o.Disabled) {
var ret bool
return ret
}
return *o.Disabled
}
// GetDisabledOk returns a tuple with the Disabled field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *O11yBuilderQuery) GetDisabledOk() (*bool, bool) {
if o == nil || IsNil(o.Disabled) {
return nil, false
}
return o.Disabled, true
}
// HasDisabled returns a boolean if a field has been set.
func (o *O11yBuilderQuery) HasDisabled() bool {
if o != nil && !IsNil(o.Disabled) {
return true
}
return false
}
// SetDisabled gets a reference to the given bool and assigns it to the Disabled field.
func (o *O11yBuilderQuery) SetDisabled(v bool) {
o.Disabled = &v
}
// GetExpression returns the Expression field value if set, zero value otherwise.
func (o *O11yBuilderQuery) GetExpression() string {
if o == nil || IsNil(o.Expression) {
var ret string
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 *O11yBuilderQuery) GetExpressionOk() (*string, bool) {
if o == nil || IsNil(o.Expression) {
return nil, false
}
return o.Expression, true
}
// HasExpression returns a boolean if a field has been set.
func (o *O11yBuilderQuery) HasExpression() bool {
if o != nil && !IsNil(o.Expression) {
return true
}
return false
}
// SetExpression gets a reference to the given string and assigns it to the Expression field.
func (o *O11yBuilderQuery) SetExpression(v string) {
o.Expression = &v
}
// GetFilters returns the Filters field value if set, zero value otherwise.
func (o *O11yBuilderQuery) GetFilters() O11yFilterSet {
if o == nil || IsNil(o.Filters) {
var ret O11yFilterSet
return ret
}
return *o.Filters
}
// GetFiltersOk returns a tuple with the Filters field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *O11yBuilderQuery) GetFiltersOk() (*O11yFilterSet, bool) {
if o == nil || IsNil(o.Filters) {
return nil, false
}
return o.Filters, true
}
// HasFilters returns a boolean if a field has been set.
func (o *O11yBuilderQuery) HasFilters() bool {
if o != nil && !IsNil(o.Filters) {
return true
}
return false
}
// SetFilters gets a reference to the given O11yFilterSet and assigns it to the Filters field.
func (o *O11yBuilderQuery) SetFilters(v O11yFilterSet) {
o.Filters = &v
}
// GetFunctions returns the Functions field value if set, zero value otherwise.
func (o *O11yBuilderQuery) GetFunctions() []O11yFunction {
if o == nil || IsNil(o.Functions) {
var ret []O11yFunction
return ret
}
return o.Functions
}
// GetFunctionsOk returns a tuple with the Functions field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *O11yBuilderQuery) GetFunctionsOk() ([]O11yFunction, bool) {
if o == nil || IsNil(o.Functions) {
return nil, false
}
return o.Functions, true
}
// HasFunctions returns a boolean if a field has been set.
func (o *O11yBuilderQuery) HasFunctions() bool {
if o != nil && !IsNil(o.Functions) {
return true
}
return false
}
// SetFunctions gets a reference to the given []O11yFunction and assigns it to the Functions field.
func (o *O11yBuilderQuery) SetFunctions(v []O11yFunction) {
o.Functions = v
}
// GetGroupBy returns the GroupBy field value if set, zero value otherwise.
func (o *O11yBuilderQuery) GetGroupBy() []O11yAttributeKey {
if o == nil || IsNil(o.GroupBy) {
var ret []O11yAttributeKey
return ret
}
return o.GroupBy
}
// GetGroupByOk returns a tuple with the GroupBy field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *O11yBuilderQuery) GetGroupByOk() ([]O11yAttributeKey, bool) {
if o == nil || IsNil(o.GroupBy) {
return nil, false
}
return o.GroupBy, true
}
// HasGroupBy returns a boolean if a field has been set.
func (o *O11yBuilderQuery) HasGroupBy() bool {
if o != nil && !IsNil(o.GroupBy) {
return true
}
return false
}
// SetGroupBy gets a reference to the given []O11yAttributeKey and assigns it to the GroupBy field.
func (o *O11yBuilderQuery) SetGroupBy(v []O11yAttributeKey) {
o.GroupBy = v
}
// GetHaving returns the Having field value if set, zero value otherwise.
func (o *O11yBuilderQuery) GetHaving() []O11yHaving {
if o == nil || IsNil(o.Having) {
var ret []O11yHaving
return ret
}
return o.Having
}
// GetHavingOk returns a tuple with the Having field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *O11yBuilderQuery) GetHavingOk() ([]O11yHaving, bool) {
if o == nil || IsNil(o.Having) {
return nil, false
}
return o.Having, true
}
// HasHaving returns a boolean if a field has been set.
func (o *O11yBuilderQuery) HasHaving() bool {
if o != nil && !IsNil(o.Having) {
return true
}
return false
}
// SetHaving gets a reference to the given []O11yHaving and assigns it to the Having field.
func (o *O11yBuilderQuery) SetHaving(v []O11yHaving) {
o.Having = v
}
// GetLegend returns the Legend field value if set, zero value otherwise.
func (o *O11yBuilderQuery) GetLegend() string {
if o == nil || IsNil(o.Legend) {
var ret string
return ret
}
return *o.Legend
}
// GetLegendOk returns a tuple with the Legend field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *O11yBuilderQuery) GetLegendOk() (*string, bool) {
if o == nil || IsNil(o.Legend) {
return nil, false
}
return o.Legend, true
}
// HasLegend returns a boolean if a field has been set.
func (o *O11yBuilderQuery) HasLegend() bool {
if o != nil && !IsNil(o.Legend) {
return true
}
return false
}
// SetLegend gets a reference to the given string and assigns it to the Legend field.
func (o *O11yBuilderQuery) SetLegend(v string) {
o.Legend = &v
}
// GetLimit returns the Limit field value if set, zero value otherwise.
func (o *O11yBuilderQuery) GetLimit() int32 {
if o == nil || IsNil(o.Limit) {
var ret int32
return ret
}
return *o.Limit
}
// GetLimitOk returns a tuple with the Limit field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *O11yBuilderQuery) GetLimitOk() (*int32, bool) {
if o == nil || IsNil(o.Limit) {
return nil, false
}
return o.Limit, true
}
// HasLimit returns a boolean if a field has been set.
func (o *O11yBuilderQuery) HasLimit() bool {
if o != nil && !IsNil(o.Limit) {
return true
}
return false
}
// SetLimit gets a reference to the given int32 and assigns it to the Limit field.
func (o *O11yBuilderQuery) SetLimit(v int32) {
o.Limit = &v
}
// GetOffset returns the Offset field value if set, zero value otherwise.
func (o *O11yBuilderQuery) GetOffset() int32 {
if o == nil || IsNil(o.Offset) {
var ret int32
return ret
}
return *o.Offset
}
// GetOffsetOk returns a tuple with the Offset field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *O11yBuilderQuery) GetOffsetOk() (*int32, bool) {
if o == nil || IsNil(o.Offset) {
return nil, false
}
return o.Offset, true
}
// HasOffset returns a boolean if a field has been set.
func (o *O11yBuilderQuery) HasOffset() bool {
if o != nil && !IsNil(o.Offset) {
return true
}
return false
}
// SetOffset gets a reference to the given int32 and assigns it to the Offset field.
func (o *O11yBuilderQuery) SetOffset(v int32) {
o.Offset = &v
}
// GetOrderBy returns the OrderBy field value if set, zero value otherwise.
func (o *O11yBuilderQuery) GetOrderBy() []O11yOrderBy {
if o == nil || IsNil(o.OrderBy) {
var ret []O11yOrderBy
return ret
}
return o.OrderBy
}
// GetOrderByOk returns a tuple with the OrderBy field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *O11yBuilderQuery) GetOrderByOk() ([]O11yOrderBy, bool) {
if o == nil || IsNil(o.OrderBy) {
return nil, false
}
return o.OrderBy, true
}
// HasOrderBy returns a boolean if a field has been set.
func (o *O11yBuilderQuery) HasOrderBy() bool {
if o != nil && !IsNil(o.OrderBy) {
return true
}
return false
}
// SetOrderBy gets a reference to the given []O11yOrderBy and assigns it to the OrderBy field.
func (o *O11yBuilderQuery) SetOrderBy(v []O11yOrderBy) {
o.OrderBy = v
}
// GetPageSize returns the PageSize field value if set, zero value otherwise.
func (o *O11yBuilderQuery) GetPageSize() int32 {
if o == nil || IsNil(o.PageSize) {
var ret int32
return ret
}
return *o.PageSize
}
// GetPageSizeOk returns a tuple with the PageSize field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *O11yBuilderQuery) GetPageSizeOk() (*int32, bool) {
if o == nil || IsNil(o.PageSize) {
return nil, false
}
return o.PageSize, true
}
// HasPageSize returns a boolean if a field has been set.
func (o *O11yBuilderQuery) HasPageSize() bool {
if o != nil && !IsNil(o.PageSize) {
return true
}
return false
}
// SetPageSize gets a reference to the given int32 and assigns it to the PageSize field.
func (o *O11yBuilderQuery) SetPageSize(v int32) {
o.PageSize = &v
}
// GetQueryName returns the QueryName field value if set, zero value otherwise.
func (o *O11yBuilderQuery) GetQueryName() string {
if o == nil || IsNil(o.QueryName) {
var ret string
return ret
}
return *o.QueryName
}
// GetQueryNameOk returns a tuple with the QueryName field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *O11yBuilderQuery) GetQueryNameOk() (*string, bool) {
if o == nil || IsNil(o.QueryName) {
return nil, false
}
return o.QueryName, true
}
// HasQueryName returns a boolean if a field has been set.
func (o *O11yBuilderQuery) HasQueryName() bool {
if o != nil && !IsNil(o.QueryName) {
return true
}
return false
}
// SetQueryName gets a reference to the given string and assigns it to the QueryName field.
func (o *O11yBuilderQuery) SetQueryName(v string) {
o.QueryName = &v
}
// GetReduceTo returns the ReduceTo field value if set, zero value otherwise.
func (o *O11yBuilderQuery) GetReduceTo() string {
if o == nil || IsNil(o.ReduceTo) {
var ret string
return ret
}
return *o.ReduceTo
}
// GetReduceToOk returns a tuple with the ReduceTo field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *O11yBuilderQuery) GetReduceToOk() (*string, bool) {
if o == nil || IsNil(o.ReduceTo) {
return nil, false
}
return o.ReduceTo, true
}
// HasReduceTo returns a boolean if a field has been set.
func (o *O11yBuilderQuery) HasReduceTo() bool {
if o != nil && !IsNil(o.ReduceTo) {
return true
}
return false
}
// SetReduceTo gets a reference to the given string and assigns it to the ReduceTo field.
func (o *O11yBuilderQuery) SetReduceTo(v string) {
o.ReduceTo = &v
}
// GetSelectColumns returns the SelectColumns field value if set, zero value otherwise.
func (o *O11yBuilderQuery) GetSelectColumns() []O11yAttributeKey {
if o == nil || IsNil(o.SelectColumns) {
var ret []O11yAttributeKey
return ret
}
return o.SelectColumns
}
// GetSelectColumnsOk returns a tuple with the SelectColumns field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *O11yBuilderQuery) GetSelectColumnsOk() ([]O11yAttributeKey, bool) {
if o == nil || IsNil(o.SelectColumns) {
return nil, false
}
return o.SelectColumns, true
}
// HasSelectColumns returns a boolean if a field has been set.
func (o *O11yBuilderQuery) HasSelectColumns() bool {
if o != nil && !IsNil(o.SelectColumns) {
return true
}
return false
}
// SetSelectColumns gets a reference to the given []O11yAttributeKey and assigns it to the SelectColumns field.
func (o *O11yBuilderQuery) SetSelectColumns(v []O11yAttributeKey) {
o.SelectColumns = v
}
// GetSeriesAggregation returns the SeriesAggregation field value if set, zero value otherwise.
func (o *O11yBuilderQuery) GetSeriesAggregation() string {
if o == nil || IsNil(o.SeriesAggregation) {
var ret string
return ret
}
return *o.SeriesAggregation
}
// GetSeriesAggregationOk returns a tuple with the SeriesAggregation field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *O11yBuilderQuery) GetSeriesAggregationOk() (*string, bool) {
if o == nil || IsNil(o.SeriesAggregation) {
return nil, false
}
return o.SeriesAggregation, true
}
// HasSeriesAggregation returns a boolean if a field has been set.
func (o *O11yBuilderQuery) HasSeriesAggregation() bool {
if o != nil && !IsNil(o.SeriesAggregation) {
return true
}
return false
}
// SetSeriesAggregation gets a reference to the given string and assigns it to the SeriesAggregation field.
func (o *O11yBuilderQuery) SetSeriesAggregation(v string) {
o.SeriesAggregation = &v
}
// GetSpaceAggregation returns the SpaceAggregation field value if set, zero value otherwise.
func (o *O11yBuilderQuery) GetSpaceAggregation() string {
if o == nil || IsNil(o.SpaceAggregation) {
var ret string
return ret
}
return *o.SpaceAggregation
}
// GetSpaceAggregationOk returns a tuple with the SpaceAggregation field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *O11yBuilderQuery) GetSpaceAggregationOk() (*string, bool) {
if o == nil || IsNil(o.SpaceAggregation) {
return nil, false
}
return o.SpaceAggregation, true
}
// HasSpaceAggregation returns a boolean if a field has been set.
func (o *O11yBuilderQuery) HasSpaceAggregation() bool {
if o != nil && !IsNil(o.SpaceAggregation) {
return true
}
return false
}
// SetSpaceAggregation gets a reference to the given string and assigns it to the SpaceAggregation field.
func (o *O11yBuilderQuery) SetSpaceAggregation(v string) {
o.SpaceAggregation = &v
}
// GetStepInterval returns the StepInterval field value if set, zero value otherwise.
func (o *O11yBuilderQuery) GetStepInterval() int64 {
if o == nil || IsNil(o.StepInterval) {
var ret int64
return ret
}
return *o.StepInterval
}
// GetStepIntervalOk returns a tuple with the StepInterval field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *O11yBuilderQuery) GetStepIntervalOk() (*int64, bool) {
if o == nil || IsNil(o.StepInterval) {
return nil, false
}
return o.StepInterval, true
}
// HasStepInterval returns a boolean if a field has been set.
func (o *O11yBuilderQuery) HasStepInterval() bool {
if o != nil && !IsNil(o.StepInterval) {
return true
}
return false
}
// SetStepInterval gets a reference to the given int64 and assigns it to the StepInterval field.
func (o *O11yBuilderQuery) SetStepInterval(v int64) {
o.StepInterval = &v
}
// GetTemporality returns the Temporality field value if set, zero value otherwise.
func (o *O11yBuilderQuery) GetTemporality() string {
if o == nil || IsNil(o.Temporality) {
var ret string
return ret
}
return *o.Temporality
}
// GetTemporalityOk returns a tuple with the Temporality field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *O11yBuilderQuery) GetTemporalityOk() (*string, bool) {
if o == nil || IsNil(o.Temporality) {
return nil, false
}
return o.Temporality, true
}
// HasTemporality returns a boolean if a field has been set.
func (o *O11yBuilderQuery) HasTemporality() bool {
if o != nil && !IsNil(o.Temporality) {
return true
}
return false
}
// SetTemporality gets a reference to the given string and assigns it to the Temporality field.
func (o *O11yBuilderQuery) SetTemporality(v string) {
o.Temporality = &v
}
// GetTimeAggregation returns the TimeAggregation field value if set, zero value otherwise.
func (o *O11yBuilderQuery) GetTimeAggregation() string {
if o == nil || IsNil(o.TimeAggregation) {
var ret string
return ret
}
return *o.TimeAggregation
}
// GetTimeAggregationOk returns a tuple with the TimeAggregation field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *O11yBuilderQuery) GetTimeAggregationOk() (*string, bool) {
if o == nil || IsNil(o.TimeAggregation) {
return nil, false
}
return o.TimeAggregation, true
}
// HasTimeAggregation returns a boolean if a field has been set.
func (o *O11yBuilderQuery) HasTimeAggregation() bool {
if o != nil && !IsNil(o.TimeAggregation) {
return true
}
return false
}
// SetTimeAggregation gets a reference to the given string and assigns it to the TimeAggregation field.
func (o *O11yBuilderQuery) SetTimeAggregation(v string) {
o.TimeAggregation = &v
}
func (o O11yBuilderQuery) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o O11yBuilderQuery) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.IsAnomaly) {
toSerialize["IsAnomaly"] = o.IsAnomaly
}
if !IsNil(o.QueriesUsedInFormula) {
toSerialize["QueriesUsedInFormula"] = o.QueriesUsedInFormula
}
if !IsNil(o.ShiftBy) {
toSerialize["ShiftBy"] = o.ShiftBy
}
if !IsNil(o.AggregateAttribute) {
toSerialize["aggregateAttribute"] = o.AggregateAttribute
}
if !IsNil(o.AggregateOperator) {
toSerialize["aggregateOperator"] = o.AggregateOperator
}
if !IsNil(o.DataSource) {
toSerialize["dataSource"] = o.DataSource
}
if !IsNil(o.Disabled) {
toSerialize["disabled"] = o.Disabled
}
if !IsNil(o.Expression) {
toSerialize["expression"] = o.Expression
}
if !IsNil(o.Filters) {
toSerialize["filters"] = o.Filters
}
if !IsNil(o.Functions) {
toSerialize["functions"] = o.Functions
}
if !IsNil(o.GroupBy) {
toSerialize["groupBy"] = o.GroupBy
}
if !IsNil(o.Having) {
toSerialize["having"] = o.Having
}
if !IsNil(o.Legend) {
toSerialize["legend"] = o.Legend
}
if !IsNil(o.Limit) {
toSerialize["limit"] = o.Limit
}
if !IsNil(o.Offset) {
toSerialize["offset"] = o.Offset
}
if !IsNil(o.OrderBy) {
toSerialize["orderBy"] = o.OrderBy
}
if !IsNil(o.PageSize) {
toSerialize["pageSize"] = o.PageSize
}
if !IsNil(o.QueryName) {
toSerialize["queryName"] = o.QueryName
}
if !IsNil(o.ReduceTo) {
toSerialize["reduceTo"] = o.ReduceTo
}
if !IsNil(o.SelectColumns) {
toSerialize["selectColumns"] = o.SelectColumns
}
if !IsNil(o.SeriesAggregation) {
toSerialize["seriesAggregation"] = o.SeriesAggregation
}
if !IsNil(o.SpaceAggregation) {
toSerialize["spaceAggregation"] = o.SpaceAggregation
}
if !IsNil(o.StepInterval) {
toSerialize["stepInterval"] = o.StepInterval
}
if !IsNil(o.Temporality) {
toSerialize["temporality"] = o.Temporality
}
if !IsNil(o.TimeAggregation) {
toSerialize["timeAggregation"] = o.TimeAggregation
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *O11yBuilderQuery) UnmarshalJSON(data []byte) (err error) {
varO11yBuilderQuery := _O11yBuilderQuery{}
err = json.Unmarshal(data, &varO11yBuilderQuery)
if err != nil {
return err
}
*o = O11yBuilderQuery(varO11yBuilderQuery)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "IsAnomaly")
delete(additionalProperties, "QueriesUsedInFormula")
delete(additionalProperties, "ShiftBy")
delete(additionalProperties, "aggregateAttribute")
delete(additionalProperties, "aggregateOperator")
delete(additionalProperties, "dataSource")
delete(additionalProperties, "disabled")
delete(additionalProperties, "expression")
delete(additionalProperties, "filters")
delete(additionalProperties, "functions")
delete(additionalProperties, "groupBy")
delete(additionalProperties, "having")
delete(additionalProperties, "legend")
delete(additionalProperties, "limit")
delete(additionalProperties, "offset")
delete(additionalProperties, "orderBy")
delete(additionalProperties, "pageSize")
delete(additionalProperties, "queryName")
delete(additionalProperties, "reduceTo")
delete(additionalProperties, "selectColumns")
delete(additionalProperties, "seriesAggregation")
delete(additionalProperties, "spaceAggregation")
delete(additionalProperties, "stepInterval")
delete(additionalProperties, "temporality")
delete(additionalProperties, "timeAggregation")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableO11yBuilderQuery struct {
value *O11yBuilderQuery
isSet bool
}
func (v NullableO11yBuilderQuery) Get() *O11yBuilderQuery {
return v.value
}
func (v *NullableO11yBuilderQuery) Set(val *O11yBuilderQuery) {
v.value = val
v.isSet = true
}
func (v NullableO11yBuilderQuery) IsSet() bool {
return v.isSet
}
func (v *NullableO11yBuilderQuery) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableO11yBuilderQuery(val *O11yBuilderQuery) *NullableO11yBuilderQuery {
return &NullableO11yBuilderQuery{value: val, isSet: true}
}
func (v NullableO11yBuilderQuery) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableO11yBuilderQuery) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}