Files
sdk/model_o11y_o11y_queue_row.go

194 lines
5.2 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 O11yO11yQueueRow type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &O11yO11yQueueRow{}
// O11yO11yQueueRow struct for O11yO11yQueueRow
type O11yO11yQueueRow struct {
// Data holds the row's cells keyed by column name; each cell's JSON type is the column's own, so the bytes pass through verbatim.
Data map[string]interface{} `json:"data,omitempty"`
// Timestamp anchors the row in time.
Timestamp *time.Time `json:"timestamp,omitempty"`
AdditionalProperties map[string]interface{}
}
type _O11yO11yQueueRow O11yO11yQueueRow
// NewO11yO11yQueueRow instantiates a new O11yO11yQueueRow 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 NewO11yO11yQueueRow() *O11yO11yQueueRow {
this := O11yO11yQueueRow{}
return &this
}
// NewO11yO11yQueueRowWithDefaults instantiates a new O11yO11yQueueRow 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 NewO11yO11yQueueRowWithDefaults() *O11yO11yQueueRow {
this := O11yO11yQueueRow{}
return &this
}
// GetData returns the Data field value if set, zero value otherwise.
func (o *O11yO11yQueueRow) GetData() map[string]interface{} {
if o == nil || IsNil(o.Data) {
var ret map[string]interface{}
return ret
}
return o.Data
}
// GetDataOk returns a tuple with the Data field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *O11yO11yQueueRow) GetDataOk() (map[string]interface{}, bool) {
if o == nil || IsNil(o.Data) {
return map[string]interface{}{}, false
}
return o.Data, true
}
// HasData returns a boolean if a field has been set.
func (o *O11yO11yQueueRow) HasData() bool {
if o != nil && !IsNil(o.Data) {
return true
}
return false
}
// SetData gets a reference to the given map[string]interface{} and assigns it to the Data field.
func (o *O11yO11yQueueRow) SetData(v map[string]interface{}) {
o.Data = v
}
// GetTimestamp returns the Timestamp field value if set, zero value otherwise.
func (o *O11yO11yQueueRow) GetTimestamp() time.Time {
if o == nil || IsNil(o.Timestamp) {
var ret time.Time
return ret
}
return *o.Timestamp
}
// GetTimestampOk returns a tuple with the Timestamp field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *O11yO11yQueueRow) GetTimestampOk() (*time.Time, bool) {
if o == nil || IsNil(o.Timestamp) {
return nil, false
}
return o.Timestamp, true
}
// HasTimestamp returns a boolean if a field has been set.
func (o *O11yO11yQueueRow) HasTimestamp() bool {
if o != nil && !IsNil(o.Timestamp) {
return true
}
return false
}
// SetTimestamp gets a reference to the given time.Time and assigns it to the Timestamp field.
func (o *O11yO11yQueueRow) SetTimestamp(v time.Time) {
o.Timestamp = &v
}
func (o O11yO11yQueueRow) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o O11yO11yQueueRow) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Data) {
toSerialize["data"] = o.Data
}
if !IsNil(o.Timestamp) {
toSerialize["timestamp"] = o.Timestamp
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *O11yO11yQueueRow) UnmarshalJSON(data []byte) (err error) {
varO11yO11yQueueRow := _O11yO11yQueueRow{}
err = json.Unmarshal(data, &varO11yO11yQueueRow)
if err != nil {
return err
}
*o = O11yO11yQueueRow(varO11yO11yQueueRow)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "data")
delete(additionalProperties, "timestamp")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableO11yO11yQueueRow struct {
value *O11yO11yQueueRow
isSet bool
}
func (v NullableO11yO11yQueueRow) Get() *O11yO11yQueueRow {
return v.value
}
func (v *NullableO11yO11yQueueRow) Set(val *O11yO11yQueueRow) {
v.value = val
v.isSet = true
}
func (v NullableO11yO11yQueueRow) IsSet() bool {
return v.isSet
}
func (v *NullableO11yO11yQueueRow) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableO11yO11yQueueRow(val *O11yO11yQueueRow) *NullableO11yO11yQueueRow {
return &NullableO11yO11yQueueRow{value: val, isSet: true}
}
func (v NullableO11yO11yQueueRow) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableO11yO11yQueueRow) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}