mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
229 lines
5.6 KiB
Go
229 lines
5.6 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 O11yHaving type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &O11yHaving{}
|
|
|
|
// O11yHaving struct for O11yHaving
|
|
type O11yHaving struct {
|
|
ColumnName *string `json:"columnName,omitempty"`
|
|
Op *string `json:"op,omitempty"`
|
|
Value interface{} `json:"value,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _O11yHaving O11yHaving
|
|
|
|
// NewO11yHaving instantiates a new O11yHaving 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 NewO11yHaving() *O11yHaving {
|
|
this := O11yHaving{}
|
|
return &this
|
|
}
|
|
|
|
// NewO11yHavingWithDefaults instantiates a new O11yHaving 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 NewO11yHavingWithDefaults() *O11yHaving {
|
|
this := O11yHaving{}
|
|
return &this
|
|
}
|
|
|
|
// GetColumnName returns the ColumnName field value if set, zero value otherwise.
|
|
func (o *O11yHaving) GetColumnName() string {
|
|
if o == nil || IsNil(o.ColumnName) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.ColumnName
|
|
}
|
|
|
|
// GetColumnNameOk returns a tuple with the ColumnName field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *O11yHaving) GetColumnNameOk() (*string, bool) {
|
|
if o == nil || IsNil(o.ColumnName) {
|
|
return nil, false
|
|
}
|
|
return o.ColumnName, true
|
|
}
|
|
|
|
// HasColumnName returns a boolean if a field has been set.
|
|
func (o *O11yHaving) HasColumnName() bool {
|
|
if o != nil && !IsNil(o.ColumnName) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetColumnName gets a reference to the given string and assigns it to the ColumnName field.
|
|
func (o *O11yHaving) SetColumnName(v string) {
|
|
o.ColumnName = &v
|
|
}
|
|
|
|
// GetOp returns the Op field value if set, zero value otherwise.
|
|
func (o *O11yHaving) GetOp() string {
|
|
if o == nil || IsNil(o.Op) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Op
|
|
}
|
|
|
|
// GetOpOk returns a tuple with the Op field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *O11yHaving) GetOpOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Op) {
|
|
return nil, false
|
|
}
|
|
return o.Op, true
|
|
}
|
|
|
|
// HasOp returns a boolean if a field has been set.
|
|
func (o *O11yHaving) HasOp() bool {
|
|
if o != nil && !IsNil(o.Op) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetOp gets a reference to the given string and assigns it to the Op field.
|
|
func (o *O11yHaving) SetOp(v string) {
|
|
o.Op = &v
|
|
}
|
|
|
|
// GetValue returns the Value field value if set, zero value otherwise (both if not set or set to explicit null).
|
|
func (o *O11yHaving) GetValue() interface{} {
|
|
if o == nil {
|
|
var ret interface{}
|
|
return ret
|
|
}
|
|
return o.Value
|
|
}
|
|
|
|
// GetValueOk returns a tuple with the Value 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 *O11yHaving) GetValueOk() (*interface{}, bool) {
|
|
if o == nil || IsNil(o.Value) {
|
|
return nil, false
|
|
}
|
|
return &o.Value, true
|
|
}
|
|
|
|
// HasValue returns a boolean if a field has been set.
|
|
func (o *O11yHaving) HasValue() bool {
|
|
if o != nil && !IsNil(o.Value) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetValue gets a reference to the given interface{} and assigns it to the Value field.
|
|
func (o *O11yHaving) SetValue(v interface{}) {
|
|
o.Value = v
|
|
}
|
|
|
|
func (o O11yHaving) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o O11yHaving) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.ColumnName) {
|
|
toSerialize["columnName"] = o.ColumnName
|
|
}
|
|
if !IsNil(o.Op) {
|
|
toSerialize["op"] = o.Op
|
|
}
|
|
if o.Value != nil {
|
|
toSerialize["value"] = o.Value
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *O11yHaving) UnmarshalJSON(data []byte) (err error) {
|
|
varO11yHaving := _O11yHaving{}
|
|
|
|
err = json.Unmarshal(data, &varO11yHaving)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = O11yHaving(varO11yHaving)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "columnName")
|
|
delete(additionalProperties, "op")
|
|
delete(additionalProperties, "value")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableO11yHaving struct {
|
|
value *O11yHaving
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableO11yHaving) Get() *O11yHaving {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableO11yHaving) Set(val *O11yHaving) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableO11yHaving) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableO11yHaving) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableO11yHaving(val *O11yHaving) *NullableO11yHaving {
|
|
return &NullableO11yHaving{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableO11yHaving) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableO11yHaving) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|