mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
228 lines
6.5 KiB
Go
228 lines
6.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 O11yPostableSpanMapperGroup type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &O11yPostableSpanMapperGroup{}
|
|
|
|
// O11yPostableSpanMapperGroup struct for O11yPostableSpanMapperGroup
|
|
type O11yPostableSpanMapperGroup struct {
|
|
Condition *O11ySpanMapperGroupCondition `json:"condition,omitempty"`
|
|
Enabled *bool `json:"enabled,omitempty"`
|
|
Name *string `json:"name,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _O11yPostableSpanMapperGroup O11yPostableSpanMapperGroup
|
|
|
|
// NewO11yPostableSpanMapperGroup instantiates a new O11yPostableSpanMapperGroup 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 NewO11yPostableSpanMapperGroup() *O11yPostableSpanMapperGroup {
|
|
this := O11yPostableSpanMapperGroup{}
|
|
return &this
|
|
}
|
|
|
|
// NewO11yPostableSpanMapperGroupWithDefaults instantiates a new O11yPostableSpanMapperGroup 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 NewO11yPostableSpanMapperGroupWithDefaults() *O11yPostableSpanMapperGroup {
|
|
this := O11yPostableSpanMapperGroup{}
|
|
return &this
|
|
}
|
|
|
|
// GetCondition returns the Condition field value if set, zero value otherwise.
|
|
func (o *O11yPostableSpanMapperGroup) GetCondition() O11ySpanMapperGroupCondition {
|
|
if o == nil || IsNil(o.Condition) {
|
|
var ret O11ySpanMapperGroupCondition
|
|
return ret
|
|
}
|
|
return *o.Condition
|
|
}
|
|
|
|
// GetConditionOk returns a tuple with the Condition field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *O11yPostableSpanMapperGroup) GetConditionOk() (*O11ySpanMapperGroupCondition, bool) {
|
|
if o == nil || IsNil(o.Condition) {
|
|
return nil, false
|
|
}
|
|
return o.Condition, true
|
|
}
|
|
|
|
// HasCondition returns a boolean if a field has been set.
|
|
func (o *O11yPostableSpanMapperGroup) HasCondition() bool {
|
|
if o != nil && !IsNil(o.Condition) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetCondition gets a reference to the given O11ySpanMapperGroupCondition and assigns it to the Condition field.
|
|
func (o *O11yPostableSpanMapperGroup) SetCondition(v O11ySpanMapperGroupCondition) {
|
|
o.Condition = &v
|
|
}
|
|
|
|
// GetEnabled returns the Enabled field value if set, zero value otherwise.
|
|
func (o *O11yPostableSpanMapperGroup) GetEnabled() bool {
|
|
if o == nil || IsNil(o.Enabled) {
|
|
var ret bool
|
|
return ret
|
|
}
|
|
return *o.Enabled
|
|
}
|
|
|
|
// GetEnabledOk returns a tuple with the Enabled field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *O11yPostableSpanMapperGroup) GetEnabledOk() (*bool, bool) {
|
|
if o == nil || IsNil(o.Enabled) {
|
|
return nil, false
|
|
}
|
|
return o.Enabled, true
|
|
}
|
|
|
|
// HasEnabled returns a boolean if a field has been set.
|
|
func (o *O11yPostableSpanMapperGroup) HasEnabled() bool {
|
|
if o != nil && !IsNil(o.Enabled) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetEnabled gets a reference to the given bool and assigns it to the Enabled field.
|
|
func (o *O11yPostableSpanMapperGroup) SetEnabled(v bool) {
|
|
o.Enabled = &v
|
|
}
|
|
|
|
// GetName returns the Name field value if set, zero value otherwise.
|
|
func (o *O11yPostableSpanMapperGroup) GetName() string {
|
|
if o == nil || IsNil(o.Name) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Name
|
|
}
|
|
|
|
// GetNameOk returns a tuple with the Name field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *O11yPostableSpanMapperGroup) GetNameOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Name) {
|
|
return nil, false
|
|
}
|
|
return o.Name, true
|
|
}
|
|
|
|
// HasName returns a boolean if a field has been set.
|
|
func (o *O11yPostableSpanMapperGroup) HasName() bool {
|
|
if o != nil && !IsNil(o.Name) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetName gets a reference to the given string and assigns it to the Name field.
|
|
func (o *O11yPostableSpanMapperGroup) SetName(v string) {
|
|
o.Name = &v
|
|
}
|
|
|
|
func (o O11yPostableSpanMapperGroup) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o O11yPostableSpanMapperGroup) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Condition) {
|
|
toSerialize["condition"] = o.Condition
|
|
}
|
|
if !IsNil(o.Enabled) {
|
|
toSerialize["enabled"] = o.Enabled
|
|
}
|
|
if !IsNil(o.Name) {
|
|
toSerialize["name"] = o.Name
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *O11yPostableSpanMapperGroup) UnmarshalJSON(data []byte) (err error) {
|
|
varO11yPostableSpanMapperGroup := _O11yPostableSpanMapperGroup{}
|
|
|
|
err = json.Unmarshal(data, &varO11yPostableSpanMapperGroup)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = O11yPostableSpanMapperGroup(varO11yPostableSpanMapperGroup)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "condition")
|
|
delete(additionalProperties, "enabled")
|
|
delete(additionalProperties, "name")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableO11yPostableSpanMapperGroup struct {
|
|
value *O11yPostableSpanMapperGroup
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableO11yPostableSpanMapperGroup) Get() *O11yPostableSpanMapperGroup {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableO11yPostableSpanMapperGroup) Set(val *O11yPostableSpanMapperGroup) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableO11yPostableSpanMapperGroup) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableO11yPostableSpanMapperGroup) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableO11yPostableSpanMapperGroup(val *O11yPostableSpanMapperGroup) *NullableO11yPostableSpanMapperGroup {
|
|
return &NullableO11yPostableSpanMapperGroup{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableO11yPostableSpanMapperGroup) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableO11yPostableSpanMapperGroup) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|