mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
155 lines
4.1 KiB
Go
155 lines
4.1 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 O11yCompositeQuery type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &O11yCompositeQuery{}
|
|
|
|
// O11yCompositeQuery struct for O11yCompositeQuery
|
|
type O11yCompositeQuery struct {
|
|
// Queries is the queries to use for the request.
|
|
Queries []O11yQueryEnvelope `json:"queries,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _O11yCompositeQuery O11yCompositeQuery
|
|
|
|
// NewO11yCompositeQuery instantiates a new O11yCompositeQuery 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 NewO11yCompositeQuery() *O11yCompositeQuery {
|
|
this := O11yCompositeQuery{}
|
|
return &this
|
|
}
|
|
|
|
// NewO11yCompositeQueryWithDefaults instantiates a new O11yCompositeQuery 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 NewO11yCompositeQueryWithDefaults() *O11yCompositeQuery {
|
|
this := O11yCompositeQuery{}
|
|
return &this
|
|
}
|
|
|
|
// GetQueries returns the Queries field value if set, zero value otherwise.
|
|
func (o *O11yCompositeQuery) GetQueries() []O11yQueryEnvelope {
|
|
if o == nil || IsNil(o.Queries) {
|
|
var ret []O11yQueryEnvelope
|
|
return ret
|
|
}
|
|
return o.Queries
|
|
}
|
|
|
|
// GetQueriesOk returns a tuple with the Queries field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *O11yCompositeQuery) GetQueriesOk() ([]O11yQueryEnvelope, bool) {
|
|
if o == nil || IsNil(o.Queries) {
|
|
return nil, false
|
|
}
|
|
return o.Queries, true
|
|
}
|
|
|
|
// HasQueries returns a boolean if a field has been set.
|
|
func (o *O11yCompositeQuery) HasQueries() bool {
|
|
if o != nil && !IsNil(o.Queries) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetQueries gets a reference to the given []O11yQueryEnvelope and assigns it to the Queries field.
|
|
func (o *O11yCompositeQuery) SetQueries(v []O11yQueryEnvelope) {
|
|
o.Queries = v
|
|
}
|
|
|
|
func (o O11yCompositeQuery) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o O11yCompositeQuery) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Queries) {
|
|
toSerialize["queries"] = o.Queries
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *O11yCompositeQuery) UnmarshalJSON(data []byte) (err error) {
|
|
varO11yCompositeQuery := _O11yCompositeQuery{}
|
|
|
|
err = json.Unmarshal(data, &varO11yCompositeQuery)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = O11yCompositeQuery(varO11yCompositeQuery)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "queries")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableO11yCompositeQuery struct {
|
|
value *O11yCompositeQuery
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableO11yCompositeQuery) Get() *O11yCompositeQuery {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableO11yCompositeQuery) Set(val *O11yCompositeQuery) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableO11yCompositeQuery) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableO11yCompositeQuery) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableO11yCompositeQuery(val *O11yCompositeQuery) *NullableO11yCompositeQuery {
|
|
return &NullableO11yCompositeQuery{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableO11yCompositeQuery) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableO11yCompositeQuery) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|