Files
sdk/model_o11y_span_mapper.go

491 lines
13 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"
"time"
)
// checks if the O11ySpanMapper type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &O11ySpanMapper{}
// O11ySpanMapper struct for O11ySpanMapper
type O11ySpanMapper struct {
Config *O11ySpanMapperConfig `json:"config,omitempty"`
CreatedAt *time.Time `json:"createdAt,omitempty"`
CreatedBy *string `json:"createdBy,omitempty"`
Enabled *bool `json:"enabled,omitempty"`
FieldContext interface{} `json:"fieldContext,omitempty"`
GroupId interface{} `json:"group_id,omitempty"`
Id interface{} `json:"id,omitempty"`
Name *string `json:"name,omitempty"`
UpdatedAt *time.Time `json:"updatedAt,omitempty"`
UpdatedBy *string `json:"updatedBy,omitempty"`
AdditionalProperties map[string]interface{}
}
type _O11ySpanMapper O11ySpanMapper
// NewO11ySpanMapper instantiates a new O11ySpanMapper 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 NewO11ySpanMapper() *O11ySpanMapper {
this := O11ySpanMapper{}
return &this
}
// NewO11ySpanMapperWithDefaults instantiates a new O11ySpanMapper 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 NewO11ySpanMapperWithDefaults() *O11ySpanMapper {
this := O11ySpanMapper{}
return &this
}
// GetConfig returns the Config field value if set, zero value otherwise.
func (o *O11ySpanMapper) GetConfig() O11ySpanMapperConfig {
if o == nil || IsNil(o.Config) {
var ret O11ySpanMapperConfig
return ret
}
return *o.Config
}
// GetConfigOk returns a tuple with the Config field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *O11ySpanMapper) GetConfigOk() (*O11ySpanMapperConfig, bool) {
if o == nil || IsNil(o.Config) {
return nil, false
}
return o.Config, true
}
// HasConfig returns a boolean if a field has been set.
func (o *O11ySpanMapper) HasConfig() bool {
if o != nil && !IsNil(o.Config) {
return true
}
return false
}
// SetConfig gets a reference to the given O11ySpanMapperConfig and assigns it to the Config field.
func (o *O11ySpanMapper) SetConfig(v O11ySpanMapperConfig) {
o.Config = &v
}
// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise.
func (o *O11ySpanMapper) GetCreatedAt() time.Time {
if o == nil || IsNil(o.CreatedAt) {
var ret time.Time
return ret
}
return *o.CreatedAt
}
// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *O11ySpanMapper) GetCreatedAtOk() (*time.Time, bool) {
if o == nil || IsNil(o.CreatedAt) {
return nil, false
}
return o.CreatedAt, true
}
// HasCreatedAt returns a boolean if a field has been set.
func (o *O11ySpanMapper) HasCreatedAt() bool {
if o != nil && !IsNil(o.CreatedAt) {
return true
}
return false
}
// SetCreatedAt gets a reference to the given time.Time and assigns it to the CreatedAt field.
func (o *O11ySpanMapper) SetCreatedAt(v time.Time) {
o.CreatedAt = &v
}
// GetCreatedBy returns the CreatedBy field value if set, zero value otherwise.
func (o *O11ySpanMapper) GetCreatedBy() string {
if o == nil || IsNil(o.CreatedBy) {
var ret string
return ret
}
return *o.CreatedBy
}
// GetCreatedByOk returns a tuple with the CreatedBy field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *O11ySpanMapper) GetCreatedByOk() (*string, bool) {
if o == nil || IsNil(o.CreatedBy) {
return nil, false
}
return o.CreatedBy, true
}
// HasCreatedBy returns a boolean if a field has been set.
func (o *O11ySpanMapper) HasCreatedBy() bool {
if o != nil && !IsNil(o.CreatedBy) {
return true
}
return false
}
// SetCreatedBy gets a reference to the given string and assigns it to the CreatedBy field.
func (o *O11ySpanMapper) SetCreatedBy(v string) {
o.CreatedBy = &v
}
// GetEnabled returns the Enabled field value if set, zero value otherwise.
func (o *O11ySpanMapper) 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 *O11ySpanMapper) 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 *O11ySpanMapper) 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 *O11ySpanMapper) SetEnabled(v bool) {
o.Enabled = &v
}
// GetFieldContext returns the FieldContext field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *O11ySpanMapper) GetFieldContext() interface{} {
if o == nil {
var ret interface{}
return ret
}
return o.FieldContext
}
// GetFieldContextOk returns a tuple with the FieldContext field value if set, nil otherwise
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *O11ySpanMapper) GetFieldContextOk() (*interface{}, bool) {
if o == nil || IsNil(o.FieldContext) {
return nil, false
}
return &o.FieldContext, true
}
// HasFieldContext returns a boolean if a field has been set.
func (o *O11ySpanMapper) HasFieldContext() bool {
if o != nil && !IsNil(o.FieldContext) {
return true
}
return false
}
// SetFieldContext gets a reference to the given interface{} and assigns it to the FieldContext field.
func (o *O11ySpanMapper) SetFieldContext(v interface{}) {
o.FieldContext = v
}
// GetGroupId returns the GroupId field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *O11ySpanMapper) GetGroupId() interface{} {
if o == nil {
var ret interface{}
return ret
}
return o.GroupId
}
// GetGroupIdOk returns a tuple with the GroupId field value if set, nil otherwise
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *O11ySpanMapper) GetGroupIdOk() (*interface{}, bool) {
if o == nil || IsNil(o.GroupId) {
return nil, false
}
return &o.GroupId, true
}
// HasGroupId returns a boolean if a field has been set.
func (o *O11ySpanMapper) HasGroupId() bool {
if o != nil && !IsNil(o.GroupId) {
return true
}
return false
}
// SetGroupId gets a reference to the given interface{} and assigns it to the GroupId field.
func (o *O11ySpanMapper) SetGroupId(v interface{}) {
o.GroupId = v
}
// GetId returns the Id field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *O11ySpanMapper) GetId() interface{} {
if o == nil {
var ret interface{}
return ret
}
return o.Id
}
// GetIdOk returns a tuple with the Id field value if set, nil otherwise
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *O11ySpanMapper) GetIdOk() (*interface{}, bool) {
if o == nil || IsNil(o.Id) {
return nil, false
}
return &o.Id, true
}
// HasId returns a boolean if a field has been set.
func (o *O11ySpanMapper) HasId() bool {
if o != nil && !IsNil(o.Id) {
return true
}
return false
}
// SetId gets a reference to the given interface{} and assigns it to the Id field.
func (o *O11ySpanMapper) SetId(v interface{}) {
o.Id = v
}
// GetName returns the Name field value if set, zero value otherwise.
func (o *O11ySpanMapper) 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 *O11ySpanMapper) 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 *O11ySpanMapper) 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 *O11ySpanMapper) SetName(v string) {
o.Name = &v
}
// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise.
func (o *O11ySpanMapper) GetUpdatedAt() time.Time {
if o == nil || IsNil(o.UpdatedAt) {
var ret time.Time
return ret
}
return *o.UpdatedAt
}
// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *O11ySpanMapper) GetUpdatedAtOk() (*time.Time, bool) {
if o == nil || IsNil(o.UpdatedAt) {
return nil, false
}
return o.UpdatedAt, true
}
// HasUpdatedAt returns a boolean if a field has been set.
func (o *O11ySpanMapper) HasUpdatedAt() bool {
if o != nil && !IsNil(o.UpdatedAt) {
return true
}
return false
}
// SetUpdatedAt gets a reference to the given time.Time and assigns it to the UpdatedAt field.
func (o *O11ySpanMapper) SetUpdatedAt(v time.Time) {
o.UpdatedAt = &v
}
// GetUpdatedBy returns the UpdatedBy field value if set, zero value otherwise.
func (o *O11ySpanMapper) GetUpdatedBy() string {
if o == nil || IsNil(o.UpdatedBy) {
var ret string
return ret
}
return *o.UpdatedBy
}
// GetUpdatedByOk returns a tuple with the UpdatedBy field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *O11ySpanMapper) GetUpdatedByOk() (*string, bool) {
if o == nil || IsNil(o.UpdatedBy) {
return nil, false
}
return o.UpdatedBy, true
}
// HasUpdatedBy returns a boolean if a field has been set.
func (o *O11ySpanMapper) HasUpdatedBy() bool {
if o != nil && !IsNil(o.UpdatedBy) {
return true
}
return false
}
// SetUpdatedBy gets a reference to the given string and assigns it to the UpdatedBy field.
func (o *O11ySpanMapper) SetUpdatedBy(v string) {
o.UpdatedBy = &v
}
func (o O11ySpanMapper) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o O11ySpanMapper) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Config) {
toSerialize["config"] = o.Config
}
if !IsNil(o.CreatedAt) {
toSerialize["createdAt"] = o.CreatedAt
}
if !IsNil(o.CreatedBy) {
toSerialize["createdBy"] = o.CreatedBy
}
if !IsNil(o.Enabled) {
toSerialize["enabled"] = o.Enabled
}
if o.FieldContext != nil {
toSerialize["fieldContext"] = o.FieldContext
}
if o.GroupId != nil {
toSerialize["group_id"] = o.GroupId
}
if o.Id != nil {
toSerialize["id"] = o.Id
}
if !IsNil(o.Name) {
toSerialize["name"] = o.Name
}
if !IsNil(o.UpdatedAt) {
toSerialize["updatedAt"] = o.UpdatedAt
}
if !IsNil(o.UpdatedBy) {
toSerialize["updatedBy"] = o.UpdatedBy
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *O11ySpanMapper) UnmarshalJSON(data []byte) (err error) {
varO11ySpanMapper := _O11ySpanMapper{}
err = json.Unmarshal(data, &varO11ySpanMapper)
if err != nil {
return err
}
*o = O11ySpanMapper(varO11ySpanMapper)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "config")
delete(additionalProperties, "createdAt")
delete(additionalProperties, "createdBy")
delete(additionalProperties, "enabled")
delete(additionalProperties, "fieldContext")
delete(additionalProperties, "group_id")
delete(additionalProperties, "id")
delete(additionalProperties, "name")
delete(additionalProperties, "updatedAt")
delete(additionalProperties, "updatedBy")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableO11ySpanMapper struct {
value *O11ySpanMapper
isSet bool
}
func (v NullableO11ySpanMapper) Get() *O11ySpanMapper {
return v.value
}
func (v *NullableO11ySpanMapper) Set(val *O11ySpanMapper) {
v.value = val
v.isSet = true
}
func (v NullableO11ySpanMapper) IsSet() bool {
return v.isSet
}
func (v *NullableO11ySpanMapper) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableO11ySpanMapper(val *O11ySpanMapper) *NullableO11ySpanMapper {
return &NullableO11ySpanMapper{value: val, isSet: true}
}
func (v NullableO11ySpanMapper) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableO11ySpanMapper) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}