Files
sdk/model_o11y_missing_attributes_component_entry.go

265 lines
8.5 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 O11yMissingAttributesComponentEntry type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &O11yMissingAttributesComponentEntry{}
// O11yMissingAttributesComponentEntry struct for O11yMissingAttributesComponentEntry
type O11yMissingAttributesComponentEntry struct {
AssociatedComponent *O11yAssociatedComponent `json:"associatedComponent,omitempty"`
Attributes []string `json:"attributes,omitempty"`
DocumentationLink *string `json:"documentationLink,omitempty"`
Message *string `json:"message,omitempty"`
AdditionalProperties map[string]interface{}
}
type _O11yMissingAttributesComponentEntry O11yMissingAttributesComponentEntry
// NewO11yMissingAttributesComponentEntry instantiates a new O11yMissingAttributesComponentEntry 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 NewO11yMissingAttributesComponentEntry() *O11yMissingAttributesComponentEntry {
this := O11yMissingAttributesComponentEntry{}
return &this
}
// NewO11yMissingAttributesComponentEntryWithDefaults instantiates a new O11yMissingAttributesComponentEntry 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 NewO11yMissingAttributesComponentEntryWithDefaults() *O11yMissingAttributesComponentEntry {
this := O11yMissingAttributesComponentEntry{}
return &this
}
// GetAssociatedComponent returns the AssociatedComponent field value if set, zero value otherwise.
func (o *O11yMissingAttributesComponentEntry) 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 *O11yMissingAttributesComponentEntry) 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 *O11yMissingAttributesComponentEntry) 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 *O11yMissingAttributesComponentEntry) SetAssociatedComponent(v O11yAssociatedComponent) {
o.AssociatedComponent = &v
}
// GetAttributes returns the Attributes field value if set, zero value otherwise.
func (o *O11yMissingAttributesComponentEntry) 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 *O11yMissingAttributesComponentEntry) 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 *O11yMissingAttributesComponentEntry) 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 *O11yMissingAttributesComponentEntry) SetAttributes(v []string) {
o.Attributes = v
}
// GetDocumentationLink returns the DocumentationLink field value if set, zero value otherwise.
func (o *O11yMissingAttributesComponentEntry) GetDocumentationLink() string {
if o == nil || IsNil(o.DocumentationLink) {
var ret string
return ret
}
return *o.DocumentationLink
}
// GetDocumentationLinkOk returns a tuple with the DocumentationLink field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *O11yMissingAttributesComponentEntry) GetDocumentationLinkOk() (*string, bool) {
if o == nil || IsNil(o.DocumentationLink) {
return nil, false
}
return o.DocumentationLink, true
}
// HasDocumentationLink returns a boolean if a field has been set.
func (o *O11yMissingAttributesComponentEntry) HasDocumentationLink() bool {
if o != nil && !IsNil(o.DocumentationLink) {
return true
}
return false
}
// SetDocumentationLink gets a reference to the given string and assigns it to the DocumentationLink field.
func (o *O11yMissingAttributesComponentEntry) SetDocumentationLink(v string) {
o.DocumentationLink = &v
}
// GetMessage returns the Message field value if set, zero value otherwise.
func (o *O11yMissingAttributesComponentEntry) GetMessage() string {
if o == nil || IsNil(o.Message) {
var ret string
return ret
}
return *o.Message
}
// GetMessageOk returns a tuple with the Message field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *O11yMissingAttributesComponentEntry) GetMessageOk() (*string, bool) {
if o == nil || IsNil(o.Message) {
return nil, false
}
return o.Message, true
}
// HasMessage returns a boolean if a field has been set.
func (o *O11yMissingAttributesComponentEntry) HasMessage() bool {
if o != nil && !IsNil(o.Message) {
return true
}
return false
}
// SetMessage gets a reference to the given string and assigns it to the Message field.
func (o *O11yMissingAttributesComponentEntry) SetMessage(v string) {
o.Message = &v
}
func (o O11yMissingAttributesComponentEntry) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o O11yMissingAttributesComponentEntry) 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
}
if !IsNil(o.DocumentationLink) {
toSerialize["documentationLink"] = o.DocumentationLink
}
if !IsNil(o.Message) {
toSerialize["message"] = o.Message
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *O11yMissingAttributesComponentEntry) UnmarshalJSON(data []byte) (err error) {
varO11yMissingAttributesComponentEntry := _O11yMissingAttributesComponentEntry{}
err = json.Unmarshal(data, &varO11yMissingAttributesComponentEntry)
if err != nil {
return err
}
*o = O11yMissingAttributesComponentEntry(varO11yMissingAttributesComponentEntry)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "associatedComponent")
delete(additionalProperties, "attributes")
delete(additionalProperties, "documentationLink")
delete(additionalProperties, "message")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableO11yMissingAttributesComponentEntry struct {
value *O11yMissingAttributesComponentEntry
isSet bool
}
func (v NullableO11yMissingAttributesComponentEntry) Get() *O11yMissingAttributesComponentEntry {
return v.value
}
func (v *NullableO11yMissingAttributesComponentEntry) Set(val *O11yMissingAttributesComponentEntry) {
v.value = val
v.isSet = true
}
func (v NullableO11yMissingAttributesComponentEntry) IsSet() bool {
return v.isSet
}
func (v *NullableO11yMissingAttributesComponentEntry) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableO11yMissingAttributesComponentEntry(val *O11yMissingAttributesComponentEntry) *NullableO11yMissingAttributesComponentEntry {
return &NullableO11yMissingAttributesComponentEntry{value: val, isSet: true}
}
func (v NullableO11yMissingAttributesComponentEntry) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableO11yMissingAttributesComponentEntry) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}