mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
191 lines
5.9 KiB
Go
191 lines
5.9 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 O11yAttributesComponentEntry type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &O11yAttributesComponentEntry{}
|
|
|
|
// O11yAttributesComponentEntry struct for O11yAttributesComponentEntry
|
|
type O11yAttributesComponentEntry struct {
|
|
AssociatedComponent *O11yAssociatedComponent `json:"associatedComponent,omitempty"`
|
|
Attributes []string `json:"attributes,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _O11yAttributesComponentEntry O11yAttributesComponentEntry
|
|
|
|
// NewO11yAttributesComponentEntry instantiates a new O11yAttributesComponentEntry 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 NewO11yAttributesComponentEntry() *O11yAttributesComponentEntry {
|
|
this := O11yAttributesComponentEntry{}
|
|
return &this
|
|
}
|
|
|
|
// NewO11yAttributesComponentEntryWithDefaults instantiates a new O11yAttributesComponentEntry 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 NewO11yAttributesComponentEntryWithDefaults() *O11yAttributesComponentEntry {
|
|
this := O11yAttributesComponentEntry{}
|
|
return &this
|
|
}
|
|
|
|
// GetAssociatedComponent returns the AssociatedComponent field value if set, zero value otherwise.
|
|
func (o *O11yAttributesComponentEntry) GetAssociatedComponent() O11yAssociatedComponent {
|
|
if o == nil || IsNil(o.AssociatedComponent) {
|
|
var ret O11yAssociatedComponent
|
|
return ret
|
|
}
|
|
return *o.AssociatedComponent
|
|
}
|
|
|
|
// GetAssociatedComponentOk returns a tuple with the AssociatedComponent field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *O11yAttributesComponentEntry) GetAssociatedComponentOk() (*O11yAssociatedComponent, bool) {
|
|
if o == nil || IsNil(o.AssociatedComponent) {
|
|
return nil, false
|
|
}
|
|
return o.AssociatedComponent, true
|
|
}
|
|
|
|
// HasAssociatedComponent returns a boolean if a field has been set.
|
|
func (o *O11yAttributesComponentEntry) HasAssociatedComponent() bool {
|
|
if o != nil && !IsNil(o.AssociatedComponent) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetAssociatedComponent gets a reference to the given O11yAssociatedComponent and assigns it to the AssociatedComponent field.
|
|
func (o *O11yAttributesComponentEntry) SetAssociatedComponent(v O11yAssociatedComponent) {
|
|
o.AssociatedComponent = &v
|
|
}
|
|
|
|
// GetAttributes returns the Attributes field value if set, zero value otherwise.
|
|
func (o *O11yAttributesComponentEntry) GetAttributes() []string {
|
|
if o == nil || IsNil(o.Attributes) {
|
|
var ret []string
|
|
return ret
|
|
}
|
|
return o.Attributes
|
|
}
|
|
|
|
// GetAttributesOk returns a tuple with the Attributes field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *O11yAttributesComponentEntry) GetAttributesOk() ([]string, bool) {
|
|
if o == nil || IsNil(o.Attributes) {
|
|
return nil, false
|
|
}
|
|
return o.Attributes, true
|
|
}
|
|
|
|
// HasAttributes returns a boolean if a field has been set.
|
|
func (o *O11yAttributesComponentEntry) HasAttributes() bool {
|
|
if o != nil && !IsNil(o.Attributes) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetAttributes gets a reference to the given []string and assigns it to the Attributes field.
|
|
func (o *O11yAttributesComponentEntry) SetAttributes(v []string) {
|
|
o.Attributes = v
|
|
}
|
|
|
|
func (o O11yAttributesComponentEntry) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o O11yAttributesComponentEntry) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.AssociatedComponent) {
|
|
toSerialize["associatedComponent"] = o.AssociatedComponent
|
|
}
|
|
if !IsNil(o.Attributes) {
|
|
toSerialize["attributes"] = o.Attributes
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *O11yAttributesComponentEntry) UnmarshalJSON(data []byte) (err error) {
|
|
varO11yAttributesComponentEntry := _O11yAttributesComponentEntry{}
|
|
|
|
err = json.Unmarshal(data, &varO11yAttributesComponentEntry)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = O11yAttributesComponentEntry(varO11yAttributesComponentEntry)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "associatedComponent")
|
|
delete(additionalProperties, "attributes")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableO11yAttributesComponentEntry struct {
|
|
value *O11yAttributesComponentEntry
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableO11yAttributesComponentEntry) Get() *O11yAttributesComponentEntry {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableO11yAttributesComponentEntry) Set(val *O11yAttributesComponentEntry) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableO11yAttributesComponentEntry) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableO11yAttributesComponentEntry) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableO11yAttributesComponentEntry(val *O11yAttributesComponentEntry) *NullableO11yAttributesComponentEntry {
|
|
return &NullableO11yAttributesComponentEntry{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableO11yAttributesComponentEntry) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableO11yAttributesComponentEntry) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|