Files
sdk/model_o11y_query_range_params_v3.go

377 lines
10 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 O11yQueryRangeParamsV3 type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &O11yQueryRangeParamsV3{}
// O11yQueryRangeParamsV3 struct for O11yQueryRangeParamsV3
type O11yQueryRangeParamsV3 struct {
CompositeQuery *O11yV3CompositeQuery `json:"compositeQuery,omitempty"`
End *int64 `json:"end,omitempty"`
FormatForWeb *bool `json:"formatForWeb,omitempty"`
NoCache *bool `json:"noCache,omitempty"`
Start *int64 `json:"start,omitempty"`
// step is in seconds; used for prometheus queries
Step *int64 `json:"step,omitempty"`
Variables map[string]interface{} `json:"variables,omitempty"`
AdditionalProperties map[string]interface{}
}
type _O11yQueryRangeParamsV3 O11yQueryRangeParamsV3
// NewO11yQueryRangeParamsV3 instantiates a new O11yQueryRangeParamsV3 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 NewO11yQueryRangeParamsV3() *O11yQueryRangeParamsV3 {
this := O11yQueryRangeParamsV3{}
return &this
}
// NewO11yQueryRangeParamsV3WithDefaults instantiates a new O11yQueryRangeParamsV3 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 NewO11yQueryRangeParamsV3WithDefaults() *O11yQueryRangeParamsV3 {
this := O11yQueryRangeParamsV3{}
return &this
}
// GetCompositeQuery returns the CompositeQuery field value if set, zero value otherwise.
func (o *O11yQueryRangeParamsV3) GetCompositeQuery() O11yV3CompositeQuery {
if o == nil || IsNil(o.CompositeQuery) {
var ret O11yV3CompositeQuery
return ret
}
return *o.CompositeQuery
}
// GetCompositeQueryOk returns a tuple with the CompositeQuery field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *O11yQueryRangeParamsV3) GetCompositeQueryOk() (*O11yV3CompositeQuery, bool) {
if o == nil || IsNil(o.CompositeQuery) {
return nil, false
}
return o.CompositeQuery, true
}
// HasCompositeQuery returns a boolean if a field has been set.
func (o *O11yQueryRangeParamsV3) HasCompositeQuery() bool {
if o != nil && !IsNil(o.CompositeQuery) {
return true
}
return false
}
// SetCompositeQuery gets a reference to the given O11yV3CompositeQuery and assigns it to the CompositeQuery field.
func (o *O11yQueryRangeParamsV3) SetCompositeQuery(v O11yV3CompositeQuery) {
o.CompositeQuery = &v
}
// GetEnd returns the End field value if set, zero value otherwise.
func (o *O11yQueryRangeParamsV3) GetEnd() int64 {
if o == nil || IsNil(o.End) {
var ret int64
return ret
}
return *o.End
}
// GetEndOk returns a tuple with the End field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *O11yQueryRangeParamsV3) GetEndOk() (*int64, bool) {
if o == nil || IsNil(o.End) {
return nil, false
}
return o.End, true
}
// HasEnd returns a boolean if a field has been set.
func (o *O11yQueryRangeParamsV3) HasEnd() bool {
if o != nil && !IsNil(o.End) {
return true
}
return false
}
// SetEnd gets a reference to the given int64 and assigns it to the End field.
func (o *O11yQueryRangeParamsV3) SetEnd(v int64) {
o.End = &v
}
// GetFormatForWeb returns the FormatForWeb field value if set, zero value otherwise.
func (o *O11yQueryRangeParamsV3) GetFormatForWeb() bool {
if o == nil || IsNil(o.FormatForWeb) {
var ret bool
return ret
}
return *o.FormatForWeb
}
// GetFormatForWebOk returns a tuple with the FormatForWeb field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *O11yQueryRangeParamsV3) GetFormatForWebOk() (*bool, bool) {
if o == nil || IsNil(o.FormatForWeb) {
return nil, false
}
return o.FormatForWeb, true
}
// HasFormatForWeb returns a boolean if a field has been set.
func (o *O11yQueryRangeParamsV3) HasFormatForWeb() bool {
if o != nil && !IsNil(o.FormatForWeb) {
return true
}
return false
}
// SetFormatForWeb gets a reference to the given bool and assigns it to the FormatForWeb field.
func (o *O11yQueryRangeParamsV3) SetFormatForWeb(v bool) {
o.FormatForWeb = &v
}
// GetNoCache returns the NoCache field value if set, zero value otherwise.
func (o *O11yQueryRangeParamsV3) GetNoCache() bool {
if o == nil || IsNil(o.NoCache) {
var ret bool
return ret
}
return *o.NoCache
}
// GetNoCacheOk returns a tuple with the NoCache field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *O11yQueryRangeParamsV3) GetNoCacheOk() (*bool, bool) {
if o == nil || IsNil(o.NoCache) {
return nil, false
}
return o.NoCache, true
}
// HasNoCache returns a boolean if a field has been set.
func (o *O11yQueryRangeParamsV3) HasNoCache() bool {
if o != nil && !IsNil(o.NoCache) {
return true
}
return false
}
// SetNoCache gets a reference to the given bool and assigns it to the NoCache field.
func (o *O11yQueryRangeParamsV3) SetNoCache(v bool) {
o.NoCache = &v
}
// GetStart returns the Start field value if set, zero value otherwise.
func (o *O11yQueryRangeParamsV3) GetStart() int64 {
if o == nil || IsNil(o.Start) {
var ret int64
return ret
}
return *o.Start
}
// GetStartOk returns a tuple with the Start field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *O11yQueryRangeParamsV3) GetStartOk() (*int64, bool) {
if o == nil || IsNil(o.Start) {
return nil, false
}
return o.Start, true
}
// HasStart returns a boolean if a field has been set.
func (o *O11yQueryRangeParamsV3) HasStart() bool {
if o != nil && !IsNil(o.Start) {
return true
}
return false
}
// SetStart gets a reference to the given int64 and assigns it to the Start field.
func (o *O11yQueryRangeParamsV3) SetStart(v int64) {
o.Start = &v
}
// GetStep returns the Step field value if set, zero value otherwise.
func (o *O11yQueryRangeParamsV3) GetStep() int64 {
if o == nil || IsNil(o.Step) {
var ret int64
return ret
}
return *o.Step
}
// GetStepOk returns a tuple with the Step field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *O11yQueryRangeParamsV3) GetStepOk() (*int64, bool) {
if o == nil || IsNil(o.Step) {
return nil, false
}
return o.Step, true
}
// HasStep returns a boolean if a field has been set.
func (o *O11yQueryRangeParamsV3) HasStep() bool {
if o != nil && !IsNil(o.Step) {
return true
}
return false
}
// SetStep gets a reference to the given int64 and assigns it to the Step field.
func (o *O11yQueryRangeParamsV3) SetStep(v int64) {
o.Step = &v
}
// GetVariables returns the Variables field value if set, zero value otherwise.
func (o *O11yQueryRangeParamsV3) GetVariables() map[string]interface{} {
if o == nil || IsNil(o.Variables) {
var ret map[string]interface{}
return ret
}
return o.Variables
}
// GetVariablesOk returns a tuple with the Variables field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *O11yQueryRangeParamsV3) GetVariablesOk() (map[string]interface{}, bool) {
if o == nil || IsNil(o.Variables) {
return map[string]interface{}{}, false
}
return o.Variables, true
}
// HasVariables returns a boolean if a field has been set.
func (o *O11yQueryRangeParamsV3) HasVariables() bool {
if o != nil && !IsNil(o.Variables) {
return true
}
return false
}
// SetVariables gets a reference to the given map[string]interface{} and assigns it to the Variables field.
func (o *O11yQueryRangeParamsV3) SetVariables(v map[string]interface{}) {
o.Variables = v
}
func (o O11yQueryRangeParamsV3) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o O11yQueryRangeParamsV3) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.CompositeQuery) {
toSerialize["compositeQuery"] = o.CompositeQuery
}
if !IsNil(o.End) {
toSerialize["end"] = o.End
}
if !IsNil(o.FormatForWeb) {
toSerialize["formatForWeb"] = o.FormatForWeb
}
if !IsNil(o.NoCache) {
toSerialize["noCache"] = o.NoCache
}
if !IsNil(o.Start) {
toSerialize["start"] = o.Start
}
if !IsNil(o.Step) {
toSerialize["step"] = o.Step
}
if !IsNil(o.Variables) {
toSerialize["variables"] = o.Variables
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *O11yQueryRangeParamsV3) UnmarshalJSON(data []byte) (err error) {
varO11yQueryRangeParamsV3 := _O11yQueryRangeParamsV3{}
err = json.Unmarshal(data, &varO11yQueryRangeParamsV3)
if err != nil {
return err
}
*o = O11yQueryRangeParamsV3(varO11yQueryRangeParamsV3)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "compositeQuery")
delete(additionalProperties, "end")
delete(additionalProperties, "formatForWeb")
delete(additionalProperties, "noCache")
delete(additionalProperties, "start")
delete(additionalProperties, "step")
delete(additionalProperties, "variables")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableO11yQueryRangeParamsV3 struct {
value *O11yQueryRangeParamsV3
isSet bool
}
func (v NullableO11yQueryRangeParamsV3) Get() *O11yQueryRangeParamsV3 {
return v.value
}
func (v *NullableO11yQueryRangeParamsV3) Set(val *O11yQueryRangeParamsV3) {
v.value = val
v.isSet = true
}
func (v NullableO11yQueryRangeParamsV3) IsSet() bool {
return v.isSet
}
func (v *NullableO11yQueryRangeParamsV3) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableO11yQueryRangeParamsV3(val *O11yQueryRangeParamsV3) *NullableO11yQueryRangeParamsV3 {
return &NullableO11yQueryRangeParamsV3{value: val, isSet: true}
}
func (v NullableO11yQueryRangeParamsV3) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableO11yQueryRangeParamsV3) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}