mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
420 lines
12 KiB
Go
420 lines
12 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 O11yQueryRangeRequest type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &O11yQueryRangeRequest{}
|
|
|
|
// O11yQueryRangeRequest struct for O11yQueryRangeRequest
|
|
type O11yQueryRangeRequest struct {
|
|
// CompositeQuery is the composite query to use for the request.
|
|
CompositeQuery *O11yCompositeQuery `json:"compositeQuery,omitempty"`
|
|
// End is the end time of the query in epoch milliseconds.
|
|
End *int32 `json:"end,omitempty"`
|
|
FormatOptions *O11yFormatOptions `json:"formatOptions,omitempty"`
|
|
// NoCache is a flag to disable caching for the request.
|
|
NoCache *bool `json:"noCache,omitempty"`
|
|
RequestType interface{} `json:"requestType,omitempty"`
|
|
// SchemaVersion is the version of the schema to use for the request payload.
|
|
SchemaVersion *string `json:"schemaVersion,omitempty"`
|
|
// Start is the start time of the query in epoch milliseconds.
|
|
Start *int32 `json:"start,omitempty"`
|
|
// Variables is the variables to use for the request.
|
|
Variables map[string]O11yVariableItem `json:"variables,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _O11yQueryRangeRequest O11yQueryRangeRequest
|
|
|
|
// NewO11yQueryRangeRequest instantiates a new O11yQueryRangeRequest 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 NewO11yQueryRangeRequest() *O11yQueryRangeRequest {
|
|
this := O11yQueryRangeRequest{}
|
|
return &this
|
|
}
|
|
|
|
// NewO11yQueryRangeRequestWithDefaults instantiates a new O11yQueryRangeRequest 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 NewO11yQueryRangeRequestWithDefaults() *O11yQueryRangeRequest {
|
|
this := O11yQueryRangeRequest{}
|
|
return &this
|
|
}
|
|
|
|
// GetCompositeQuery returns the CompositeQuery field value if set, zero value otherwise.
|
|
func (o *O11yQueryRangeRequest) GetCompositeQuery() O11yCompositeQuery {
|
|
if o == nil || IsNil(o.CompositeQuery) {
|
|
var ret O11yCompositeQuery
|
|
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 *O11yQueryRangeRequest) GetCompositeQueryOk() (*O11yCompositeQuery, 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 *O11yQueryRangeRequest) HasCompositeQuery() bool {
|
|
if o != nil && !IsNil(o.CompositeQuery) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetCompositeQuery gets a reference to the given O11yCompositeQuery and assigns it to the CompositeQuery field.
|
|
func (o *O11yQueryRangeRequest) SetCompositeQuery(v O11yCompositeQuery) {
|
|
o.CompositeQuery = &v
|
|
}
|
|
|
|
// GetEnd returns the End field value if set, zero value otherwise.
|
|
func (o *O11yQueryRangeRequest) GetEnd() int32 {
|
|
if o == nil || IsNil(o.End) {
|
|
var ret int32
|
|
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 *O11yQueryRangeRequest) GetEndOk() (*int32, 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 *O11yQueryRangeRequest) HasEnd() bool {
|
|
if o != nil && !IsNil(o.End) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetEnd gets a reference to the given int32 and assigns it to the End field.
|
|
func (o *O11yQueryRangeRequest) SetEnd(v int32) {
|
|
o.End = &v
|
|
}
|
|
|
|
// GetFormatOptions returns the FormatOptions field value if set, zero value otherwise.
|
|
func (o *O11yQueryRangeRequest) GetFormatOptions() O11yFormatOptions {
|
|
if o == nil || IsNil(o.FormatOptions) {
|
|
var ret O11yFormatOptions
|
|
return ret
|
|
}
|
|
return *o.FormatOptions
|
|
}
|
|
|
|
// GetFormatOptionsOk returns a tuple with the FormatOptions field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *O11yQueryRangeRequest) GetFormatOptionsOk() (*O11yFormatOptions, bool) {
|
|
if o == nil || IsNil(o.FormatOptions) {
|
|
return nil, false
|
|
}
|
|
return o.FormatOptions, true
|
|
}
|
|
|
|
// HasFormatOptions returns a boolean if a field has been set.
|
|
func (o *O11yQueryRangeRequest) HasFormatOptions() bool {
|
|
if o != nil && !IsNil(o.FormatOptions) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetFormatOptions gets a reference to the given O11yFormatOptions and assigns it to the FormatOptions field.
|
|
func (o *O11yQueryRangeRequest) SetFormatOptions(v O11yFormatOptions) {
|
|
o.FormatOptions = &v
|
|
}
|
|
|
|
// GetNoCache returns the NoCache field value if set, zero value otherwise.
|
|
func (o *O11yQueryRangeRequest) 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 *O11yQueryRangeRequest) 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 *O11yQueryRangeRequest) 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 *O11yQueryRangeRequest) SetNoCache(v bool) {
|
|
o.NoCache = &v
|
|
}
|
|
|
|
// GetRequestType returns the RequestType field value if set, zero value otherwise (both if not set or set to explicit null).
|
|
func (o *O11yQueryRangeRequest) GetRequestType() interface{} {
|
|
if o == nil {
|
|
var ret interface{}
|
|
return ret
|
|
}
|
|
return o.RequestType
|
|
}
|
|
|
|
// GetRequestTypeOk returns a tuple with the RequestType field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
// NOTE: If the value is an explicit nil, `nil, true` will be returned
|
|
func (o *O11yQueryRangeRequest) GetRequestTypeOk() (*interface{}, bool) {
|
|
if o == nil || IsNil(o.RequestType) {
|
|
return nil, false
|
|
}
|
|
return &o.RequestType, true
|
|
}
|
|
|
|
// HasRequestType returns a boolean if a field has been set.
|
|
func (o *O11yQueryRangeRequest) HasRequestType() bool {
|
|
if o != nil && !IsNil(o.RequestType) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetRequestType gets a reference to the given interface{} and assigns it to the RequestType field.
|
|
func (o *O11yQueryRangeRequest) SetRequestType(v interface{}) {
|
|
o.RequestType = v
|
|
}
|
|
|
|
// GetSchemaVersion returns the SchemaVersion field value if set, zero value otherwise.
|
|
func (o *O11yQueryRangeRequest) GetSchemaVersion() string {
|
|
if o == nil || IsNil(o.SchemaVersion) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.SchemaVersion
|
|
}
|
|
|
|
// GetSchemaVersionOk returns a tuple with the SchemaVersion field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *O11yQueryRangeRequest) GetSchemaVersionOk() (*string, bool) {
|
|
if o == nil || IsNil(o.SchemaVersion) {
|
|
return nil, false
|
|
}
|
|
return o.SchemaVersion, true
|
|
}
|
|
|
|
// HasSchemaVersion returns a boolean if a field has been set.
|
|
func (o *O11yQueryRangeRequest) HasSchemaVersion() bool {
|
|
if o != nil && !IsNil(o.SchemaVersion) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetSchemaVersion gets a reference to the given string and assigns it to the SchemaVersion field.
|
|
func (o *O11yQueryRangeRequest) SetSchemaVersion(v string) {
|
|
o.SchemaVersion = &v
|
|
}
|
|
|
|
// GetStart returns the Start field value if set, zero value otherwise.
|
|
func (o *O11yQueryRangeRequest) GetStart() int32 {
|
|
if o == nil || IsNil(o.Start) {
|
|
var ret int32
|
|
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 *O11yQueryRangeRequest) GetStartOk() (*int32, 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 *O11yQueryRangeRequest) HasStart() bool {
|
|
if o != nil && !IsNil(o.Start) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetStart gets a reference to the given int32 and assigns it to the Start field.
|
|
func (o *O11yQueryRangeRequest) SetStart(v int32) {
|
|
o.Start = &v
|
|
}
|
|
|
|
// GetVariables returns the Variables field value if set, zero value otherwise.
|
|
func (o *O11yQueryRangeRequest) GetVariables() map[string]O11yVariableItem {
|
|
if o == nil || IsNil(o.Variables) {
|
|
var ret map[string]O11yVariableItem
|
|
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 *O11yQueryRangeRequest) GetVariablesOk() (map[string]O11yVariableItem, bool) {
|
|
if o == nil || IsNil(o.Variables) {
|
|
return map[string]O11yVariableItem{}, false
|
|
}
|
|
return o.Variables, true
|
|
}
|
|
|
|
// HasVariables returns a boolean if a field has been set.
|
|
func (o *O11yQueryRangeRequest) HasVariables() bool {
|
|
if o != nil && !IsNil(o.Variables) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetVariables gets a reference to the given map[string]O11yVariableItem and assigns it to the Variables field.
|
|
func (o *O11yQueryRangeRequest) SetVariables(v map[string]O11yVariableItem) {
|
|
o.Variables = v
|
|
}
|
|
|
|
func (o O11yQueryRangeRequest) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o O11yQueryRangeRequest) 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.FormatOptions) {
|
|
toSerialize["formatOptions"] = o.FormatOptions
|
|
}
|
|
if !IsNil(o.NoCache) {
|
|
toSerialize["noCache"] = o.NoCache
|
|
}
|
|
if o.RequestType != nil {
|
|
toSerialize["requestType"] = o.RequestType
|
|
}
|
|
if !IsNil(o.SchemaVersion) {
|
|
toSerialize["schemaVersion"] = o.SchemaVersion
|
|
}
|
|
if !IsNil(o.Start) {
|
|
toSerialize["start"] = o.Start
|
|
}
|
|
if !IsNil(o.Variables) {
|
|
toSerialize["variables"] = o.Variables
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *O11yQueryRangeRequest) UnmarshalJSON(data []byte) (err error) {
|
|
varO11yQueryRangeRequest := _O11yQueryRangeRequest{}
|
|
|
|
err = json.Unmarshal(data, &varO11yQueryRangeRequest)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = O11yQueryRangeRequest(varO11yQueryRangeRequest)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "compositeQuery")
|
|
delete(additionalProperties, "end")
|
|
delete(additionalProperties, "formatOptions")
|
|
delete(additionalProperties, "noCache")
|
|
delete(additionalProperties, "requestType")
|
|
delete(additionalProperties, "schemaVersion")
|
|
delete(additionalProperties, "start")
|
|
delete(additionalProperties, "variables")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableO11yQueryRangeRequest struct {
|
|
value *O11yQueryRangeRequest
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableO11yQueryRangeRequest) Get() *O11yQueryRangeRequest {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableO11yQueryRangeRequest) Set(val *O11yQueryRangeRequest) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableO11yQueryRangeRequest) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableO11yQueryRangeRequest) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableO11yQueryRangeRequest(val *O11yQueryRangeRequest) *NullableO11yQueryRangeRequest {
|
|
return &NullableO11yQueryRangeRequest{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableO11yQueryRangeRequest) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableO11yQueryRangeRequest) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|