Files
sdk/model_o11y_span_mapper_group.go

453 lines
12 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 O11ySpanMapperGroup type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &O11ySpanMapperGroup{}
// O11ySpanMapperGroup struct for O11ySpanMapperGroup
type O11ySpanMapperGroup struct {
Condition *O11ySpanMapperGroupCondition `json:"condition,omitempty"`
CreatedAt *time.Time `json:"createdAt,omitempty"`
CreatedBy *string `json:"createdBy,omitempty"`
Enabled *bool `json:"enabled,omitempty"`
Id interface{} `json:"id,omitempty"`
Name *string `json:"name,omitempty"`
OrgId interface{} `json:"orgId,omitempty"`
UpdatedAt *time.Time `json:"updatedAt,omitempty"`
UpdatedBy *string `json:"updatedBy,omitempty"`
AdditionalProperties map[string]interface{}
}
type _O11ySpanMapperGroup O11ySpanMapperGroup
// NewO11ySpanMapperGroup instantiates a new O11ySpanMapperGroup 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 NewO11ySpanMapperGroup() *O11ySpanMapperGroup {
this := O11ySpanMapperGroup{}
return &this
}
// NewO11ySpanMapperGroupWithDefaults instantiates a new O11ySpanMapperGroup 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 NewO11ySpanMapperGroupWithDefaults() *O11ySpanMapperGroup {
this := O11ySpanMapperGroup{}
return &this
}
// GetCondition returns the Condition field value if set, zero value otherwise.
func (o *O11ySpanMapperGroup) 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 *O11ySpanMapperGroup) 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 *O11ySpanMapperGroup) 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 *O11ySpanMapperGroup) SetCondition(v O11ySpanMapperGroupCondition) {
o.Condition = &v
}
// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise.
func (o *O11ySpanMapperGroup) 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 *O11ySpanMapperGroup) 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 *O11ySpanMapperGroup) 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 *O11ySpanMapperGroup) SetCreatedAt(v time.Time) {
o.CreatedAt = &v
}
// GetCreatedBy returns the CreatedBy field value if set, zero value otherwise.
func (o *O11ySpanMapperGroup) 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 *O11ySpanMapperGroup) 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 *O11ySpanMapperGroup) 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 *O11ySpanMapperGroup) SetCreatedBy(v string) {
o.CreatedBy = &v
}
// GetEnabled returns the Enabled field value if set, zero value otherwise.
func (o *O11ySpanMapperGroup) 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 *O11ySpanMapperGroup) 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 *O11ySpanMapperGroup) 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 *O11ySpanMapperGroup) SetEnabled(v bool) {
o.Enabled = &v
}
// GetId returns the Id field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *O11ySpanMapperGroup) 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 *O11ySpanMapperGroup) 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 *O11ySpanMapperGroup) 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 *O11ySpanMapperGroup) SetId(v interface{}) {
o.Id = v
}
// GetName returns the Name field value if set, zero value otherwise.
func (o *O11ySpanMapperGroup) 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 *O11ySpanMapperGroup) 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 *O11ySpanMapperGroup) 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 *O11ySpanMapperGroup) SetName(v string) {
o.Name = &v
}
// GetOrgId returns the OrgId field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *O11ySpanMapperGroup) GetOrgId() interface{} {
if o == nil {
var ret interface{}
return ret
}
return o.OrgId
}
// GetOrgIdOk returns a tuple with the OrgId 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 *O11ySpanMapperGroup) GetOrgIdOk() (*interface{}, bool) {
if o == nil || IsNil(o.OrgId) {
return nil, false
}
return &o.OrgId, true
}
// HasOrgId returns a boolean if a field has been set.
func (o *O11ySpanMapperGroup) HasOrgId() bool {
if o != nil && !IsNil(o.OrgId) {
return true
}
return false
}
// SetOrgId gets a reference to the given interface{} and assigns it to the OrgId field.
func (o *O11ySpanMapperGroup) SetOrgId(v interface{}) {
o.OrgId = v
}
// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise.
func (o *O11ySpanMapperGroup) 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 *O11ySpanMapperGroup) 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 *O11ySpanMapperGroup) 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 *O11ySpanMapperGroup) SetUpdatedAt(v time.Time) {
o.UpdatedAt = &v
}
// GetUpdatedBy returns the UpdatedBy field value if set, zero value otherwise.
func (o *O11ySpanMapperGroup) 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 *O11ySpanMapperGroup) 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 *O11ySpanMapperGroup) 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 *O11ySpanMapperGroup) SetUpdatedBy(v string) {
o.UpdatedBy = &v
}
func (o O11ySpanMapperGroup) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o O11ySpanMapperGroup) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Condition) {
toSerialize["condition"] = o.Condition
}
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.Id != nil {
toSerialize["id"] = o.Id
}
if !IsNil(o.Name) {
toSerialize["name"] = o.Name
}
if o.OrgId != nil {
toSerialize["orgId"] = o.OrgId
}
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 *O11ySpanMapperGroup) UnmarshalJSON(data []byte) (err error) {
varO11ySpanMapperGroup := _O11ySpanMapperGroup{}
err = json.Unmarshal(data, &varO11ySpanMapperGroup)
if err != nil {
return err
}
*o = O11ySpanMapperGroup(varO11ySpanMapperGroup)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "condition")
delete(additionalProperties, "createdAt")
delete(additionalProperties, "createdBy")
delete(additionalProperties, "enabled")
delete(additionalProperties, "id")
delete(additionalProperties, "name")
delete(additionalProperties, "orgId")
delete(additionalProperties, "updatedAt")
delete(additionalProperties, "updatedBy")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableO11ySpanMapperGroup struct {
value *O11ySpanMapperGroup
isSet bool
}
func (v NullableO11ySpanMapperGroup) Get() *O11ySpanMapperGroup {
return v.value
}
func (v *NullableO11ySpanMapperGroup) Set(val *O11ySpanMapperGroup) {
v.value = val
v.isSet = true
}
func (v NullableO11ySpanMapperGroup) IsSet() bool {
return v.isSet
}
func (v *NullableO11ySpanMapperGroup) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableO11ySpanMapperGroup(val *O11ySpanMapperGroup) *NullableO11ySpanMapperGroup {
return &NullableO11ySpanMapperGroup{value: val, isSet: true}
}
func (v NullableO11ySpanMapperGroup) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableO11ySpanMapperGroup) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}