Files
sdk/model_o11y_o11y_queue_rows_out.go

193 lines
5.1 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 O11yO11yQueueRowsOut type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &O11yO11yQueueRowsOut{}
// O11yO11yQueueRowsOut struct for O11yO11yQueueRowsOut
type O11yO11yQueueRowsOut struct {
// Data holds one row per messaging destination.
Data []O11yO11yQueueRow `json:"data,omitempty"`
// Status is \"success\".
Status *string `json:"status,omitempty"`
AdditionalProperties map[string]interface{}
}
type _O11yO11yQueueRowsOut O11yO11yQueueRowsOut
// NewO11yO11yQueueRowsOut instantiates a new O11yO11yQueueRowsOut 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 NewO11yO11yQueueRowsOut() *O11yO11yQueueRowsOut {
this := O11yO11yQueueRowsOut{}
return &this
}
// NewO11yO11yQueueRowsOutWithDefaults instantiates a new O11yO11yQueueRowsOut 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 NewO11yO11yQueueRowsOutWithDefaults() *O11yO11yQueueRowsOut {
this := O11yO11yQueueRowsOut{}
return &this
}
// GetData returns the Data field value if set, zero value otherwise.
func (o *O11yO11yQueueRowsOut) GetData() []O11yO11yQueueRow {
if o == nil || IsNil(o.Data) {
var ret []O11yO11yQueueRow
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 *O11yO11yQueueRowsOut) GetDataOk() ([]O11yO11yQueueRow, bool) {
if o == nil || IsNil(o.Data) {
return nil, false
}
return o.Data, true
}
// HasData returns a boolean if a field has been set.
func (o *O11yO11yQueueRowsOut) HasData() bool {
if o != nil && !IsNil(o.Data) {
return true
}
return false
}
// SetData gets a reference to the given []O11yO11yQueueRow and assigns it to the Data field.
func (o *O11yO11yQueueRowsOut) SetData(v []O11yO11yQueueRow) {
o.Data = v
}
// GetStatus returns the Status field value if set, zero value otherwise.
func (o *O11yO11yQueueRowsOut) GetStatus() string {
if o == nil || IsNil(o.Status) {
var ret string
return ret
}
return *o.Status
}
// GetStatusOk returns a tuple with the Status field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *O11yO11yQueueRowsOut) GetStatusOk() (*string, bool) {
if o == nil || IsNil(o.Status) {
return nil, false
}
return o.Status, true
}
// HasStatus returns a boolean if a field has been set.
func (o *O11yO11yQueueRowsOut) HasStatus() bool {
if o != nil && !IsNil(o.Status) {
return true
}
return false
}
// SetStatus gets a reference to the given string and assigns it to the Status field.
func (o *O11yO11yQueueRowsOut) SetStatus(v string) {
o.Status = &v
}
func (o O11yO11yQueueRowsOut) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o O11yO11yQueueRowsOut) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Data) {
toSerialize["data"] = o.Data
}
if !IsNil(o.Status) {
toSerialize["status"] = o.Status
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *O11yO11yQueueRowsOut) UnmarshalJSON(data []byte) (err error) {
varO11yO11yQueueRowsOut := _O11yO11yQueueRowsOut{}
err = json.Unmarshal(data, &varO11yO11yQueueRowsOut)
if err != nil {
return err
}
*o = O11yO11yQueueRowsOut(varO11yO11yQueueRowsOut)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "data")
delete(additionalProperties, "status")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableO11yO11yQueueRowsOut struct {
value *O11yO11yQueueRowsOut
isSet bool
}
func (v NullableO11yO11yQueueRowsOut) Get() *O11yO11yQueueRowsOut {
return v.value
}
func (v *NullableO11yO11yQueueRowsOut) Set(val *O11yO11yQueueRowsOut) {
v.value = val
v.isSet = true
}
func (v NullableO11yO11yQueueRowsOut) IsSet() bool {
return v.isSet
}
func (v *NullableO11yO11yQueueRowsOut) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableO11yO11yQueueRowsOut(val *O11yO11yQueueRowsOut) *NullableO11yO11yQueueRowsOut {
return &NullableO11yO11yQueueRowsOut{value: val, isSet: true}
}
func (v NullableO11yO11yQueueRowsOut) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableO11yO11yQueueRowsOut) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}