Files
sdk/model_o11y_aggregate_attribute_response.go

154 lines
4.7 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 O11yAggregateAttributeResponse type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &O11yAggregateAttributeResponse{}
// O11yAggregateAttributeResponse struct for O11yAggregateAttributeResponse
type O11yAggregateAttributeResponse struct {
AttributeKeys []O11yAttributeKey `json:"attributeKeys,omitempty"`
AdditionalProperties map[string]interface{}
}
type _O11yAggregateAttributeResponse O11yAggregateAttributeResponse
// NewO11yAggregateAttributeResponse instantiates a new O11yAggregateAttributeResponse 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 NewO11yAggregateAttributeResponse() *O11yAggregateAttributeResponse {
this := O11yAggregateAttributeResponse{}
return &this
}
// NewO11yAggregateAttributeResponseWithDefaults instantiates a new O11yAggregateAttributeResponse 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 NewO11yAggregateAttributeResponseWithDefaults() *O11yAggregateAttributeResponse {
this := O11yAggregateAttributeResponse{}
return &this
}
// GetAttributeKeys returns the AttributeKeys field value if set, zero value otherwise.
func (o *O11yAggregateAttributeResponse) GetAttributeKeys() []O11yAttributeKey {
if o == nil || IsNil(o.AttributeKeys) {
var ret []O11yAttributeKey
return ret
}
return o.AttributeKeys
}
// GetAttributeKeysOk returns a tuple with the AttributeKeys field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *O11yAggregateAttributeResponse) GetAttributeKeysOk() ([]O11yAttributeKey, bool) {
if o == nil || IsNil(o.AttributeKeys) {
return nil, false
}
return o.AttributeKeys, true
}
// HasAttributeKeys returns a boolean if a field has been set.
func (o *O11yAggregateAttributeResponse) HasAttributeKeys() bool {
if o != nil && !IsNil(o.AttributeKeys) {
return true
}
return false
}
// SetAttributeKeys gets a reference to the given []O11yAttributeKey and assigns it to the AttributeKeys field.
func (o *O11yAggregateAttributeResponse) SetAttributeKeys(v []O11yAttributeKey) {
o.AttributeKeys = v
}
func (o O11yAggregateAttributeResponse) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o O11yAggregateAttributeResponse) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.AttributeKeys) {
toSerialize["attributeKeys"] = o.AttributeKeys
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *O11yAggregateAttributeResponse) UnmarshalJSON(data []byte) (err error) {
varO11yAggregateAttributeResponse := _O11yAggregateAttributeResponse{}
err = json.Unmarshal(data, &varO11yAggregateAttributeResponse)
if err != nil {
return err
}
*o = O11yAggregateAttributeResponse(varO11yAggregateAttributeResponse)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "attributeKeys")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableO11yAggregateAttributeResponse struct {
value *O11yAggregateAttributeResponse
isSet bool
}
func (v NullableO11yAggregateAttributeResponse) Get() *O11yAggregateAttributeResponse {
return v.value
}
func (v *NullableO11yAggregateAttributeResponse) Set(val *O11yAggregateAttributeResponse) {
v.value = val
v.isSet = true
}
func (v NullableO11yAggregateAttributeResponse) IsSet() bool {
return v.isSet
}
func (v *NullableO11yAggregateAttributeResponse) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableO11yAggregateAttributeResponse(val *O11yAggregateAttributeResponse) *NullableO11yAggregateAttributeResponse {
return &NullableO11yAggregateAttributeResponse{value: val, isSet: true}
}
func (v NullableO11yAggregateAttributeResponse) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableO11yAggregateAttributeResponse) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}