Files
sdk/model_o11y_gettable_span_mapper_groups.go

154 lines
4.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 O11yGettableSpanMapperGroups type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &O11yGettableSpanMapperGroups{}
// O11yGettableSpanMapperGroups struct for O11yGettableSpanMapperGroups
type O11yGettableSpanMapperGroups struct {
Items []O11ySpanMapperGroup `json:"items,omitempty"`
AdditionalProperties map[string]interface{}
}
type _O11yGettableSpanMapperGroups O11yGettableSpanMapperGroups
// NewO11yGettableSpanMapperGroups instantiates a new O11yGettableSpanMapperGroups 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 NewO11yGettableSpanMapperGroups() *O11yGettableSpanMapperGroups {
this := O11yGettableSpanMapperGroups{}
return &this
}
// NewO11yGettableSpanMapperGroupsWithDefaults instantiates a new O11yGettableSpanMapperGroups 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 NewO11yGettableSpanMapperGroupsWithDefaults() *O11yGettableSpanMapperGroups {
this := O11yGettableSpanMapperGroups{}
return &this
}
// GetItems returns the Items field value if set, zero value otherwise.
func (o *O11yGettableSpanMapperGroups) GetItems() []O11ySpanMapperGroup {
if o == nil || IsNil(o.Items) {
var ret []O11ySpanMapperGroup
return ret
}
return o.Items
}
// GetItemsOk returns a tuple with the Items field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *O11yGettableSpanMapperGroups) GetItemsOk() ([]O11ySpanMapperGroup, bool) {
if o == nil || IsNil(o.Items) {
return nil, false
}
return o.Items, true
}
// HasItems returns a boolean if a field has been set.
func (o *O11yGettableSpanMapperGroups) HasItems() bool {
if o != nil && !IsNil(o.Items) {
return true
}
return false
}
// SetItems gets a reference to the given []O11ySpanMapperGroup and assigns it to the Items field.
func (o *O11yGettableSpanMapperGroups) SetItems(v []O11ySpanMapperGroup) {
o.Items = v
}
func (o O11yGettableSpanMapperGroups) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o O11yGettableSpanMapperGroups) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Items) {
toSerialize["items"] = o.Items
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *O11yGettableSpanMapperGroups) UnmarshalJSON(data []byte) (err error) {
varO11yGettableSpanMapperGroups := _O11yGettableSpanMapperGroups{}
err = json.Unmarshal(data, &varO11yGettableSpanMapperGroups)
if err != nil {
return err
}
*o = O11yGettableSpanMapperGroups(varO11yGettableSpanMapperGroups)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "items")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableO11yGettableSpanMapperGroups struct {
value *O11yGettableSpanMapperGroups
isSet bool
}
func (v NullableO11yGettableSpanMapperGroups) Get() *O11yGettableSpanMapperGroups {
return v.value
}
func (v *NullableO11yGettableSpanMapperGroups) Set(val *O11yGettableSpanMapperGroups) {
v.value = val
v.isSet = true
}
func (v NullableO11yGettableSpanMapperGroups) IsSet() bool {
return v.isSet
}
func (v *NullableO11yGettableSpanMapperGroups) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableO11yGettableSpanMapperGroups(val *O11yGettableSpanMapperGroups) *NullableO11yGettableSpanMapperGroups {
return &NullableO11yGettableSpanMapperGroups{value: val, isSet: true}
}
func (v NullableO11yGettableSpanMapperGroups) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableO11yGettableSpanMapperGroups) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}