mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
191 lines
5.3 KiB
Go
191 lines
5.3 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 O11yFormatOptions type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &O11yFormatOptions{}
|
|
|
|
// O11yFormatOptions struct for O11yFormatOptions
|
|
type O11yFormatOptions struct {
|
|
FillGaps *bool `json:"fillGaps,omitempty"`
|
|
FormatTableResultForUI *bool `json:"formatTableResultForUI,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _O11yFormatOptions O11yFormatOptions
|
|
|
|
// NewO11yFormatOptions instantiates a new O11yFormatOptions 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 NewO11yFormatOptions() *O11yFormatOptions {
|
|
this := O11yFormatOptions{}
|
|
return &this
|
|
}
|
|
|
|
// NewO11yFormatOptionsWithDefaults instantiates a new O11yFormatOptions 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 NewO11yFormatOptionsWithDefaults() *O11yFormatOptions {
|
|
this := O11yFormatOptions{}
|
|
return &this
|
|
}
|
|
|
|
// GetFillGaps returns the FillGaps field value if set, zero value otherwise.
|
|
func (o *O11yFormatOptions) GetFillGaps() bool {
|
|
if o == nil || IsNil(o.FillGaps) {
|
|
var ret bool
|
|
return ret
|
|
}
|
|
return *o.FillGaps
|
|
}
|
|
|
|
// GetFillGapsOk returns a tuple with the FillGaps field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *O11yFormatOptions) GetFillGapsOk() (*bool, bool) {
|
|
if o == nil || IsNil(o.FillGaps) {
|
|
return nil, false
|
|
}
|
|
return o.FillGaps, true
|
|
}
|
|
|
|
// HasFillGaps returns a boolean if a field has been set.
|
|
func (o *O11yFormatOptions) HasFillGaps() bool {
|
|
if o != nil && !IsNil(o.FillGaps) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetFillGaps gets a reference to the given bool and assigns it to the FillGaps field.
|
|
func (o *O11yFormatOptions) SetFillGaps(v bool) {
|
|
o.FillGaps = &v
|
|
}
|
|
|
|
// GetFormatTableResultForUI returns the FormatTableResultForUI field value if set, zero value otherwise.
|
|
func (o *O11yFormatOptions) GetFormatTableResultForUI() bool {
|
|
if o == nil || IsNil(o.FormatTableResultForUI) {
|
|
var ret bool
|
|
return ret
|
|
}
|
|
return *o.FormatTableResultForUI
|
|
}
|
|
|
|
// GetFormatTableResultForUIOk returns a tuple with the FormatTableResultForUI field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *O11yFormatOptions) GetFormatTableResultForUIOk() (*bool, bool) {
|
|
if o == nil || IsNil(o.FormatTableResultForUI) {
|
|
return nil, false
|
|
}
|
|
return o.FormatTableResultForUI, true
|
|
}
|
|
|
|
// HasFormatTableResultForUI returns a boolean if a field has been set.
|
|
func (o *O11yFormatOptions) HasFormatTableResultForUI() bool {
|
|
if o != nil && !IsNil(o.FormatTableResultForUI) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetFormatTableResultForUI gets a reference to the given bool and assigns it to the FormatTableResultForUI field.
|
|
func (o *O11yFormatOptions) SetFormatTableResultForUI(v bool) {
|
|
o.FormatTableResultForUI = &v
|
|
}
|
|
|
|
func (o O11yFormatOptions) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o O11yFormatOptions) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.FillGaps) {
|
|
toSerialize["fillGaps"] = o.FillGaps
|
|
}
|
|
if !IsNil(o.FormatTableResultForUI) {
|
|
toSerialize["formatTableResultForUI"] = o.FormatTableResultForUI
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *O11yFormatOptions) UnmarshalJSON(data []byte) (err error) {
|
|
varO11yFormatOptions := _O11yFormatOptions{}
|
|
|
|
err = json.Unmarshal(data, &varO11yFormatOptions)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = O11yFormatOptions(varO11yFormatOptions)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "fillGaps")
|
|
delete(additionalProperties, "formatTableResultForUI")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableO11yFormatOptions struct {
|
|
value *O11yFormatOptions
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableO11yFormatOptions) Get() *O11yFormatOptions {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableO11yFormatOptions) Set(val *O11yFormatOptions) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableO11yFormatOptions) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableO11yFormatOptions) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableO11yFormatOptions(val *O11yFormatOptions) *NullableO11yFormatOptions {
|
|
return &NullableO11yFormatOptions{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableO11yFormatOptions) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableO11yFormatOptions) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|