mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
228 lines
6.0 KiB
Go
228 lines
6.0 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 O11yQueryWarnData type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &O11yQueryWarnData{}
|
|
|
|
// O11yQueryWarnData struct for O11yQueryWarnData
|
|
type O11yQueryWarnData struct {
|
|
Message *string `json:"message,omitempty"`
|
|
Url *string `json:"url,omitempty"`
|
|
Warnings []O11yQueryWarnDataAdditional `json:"warnings,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _O11yQueryWarnData O11yQueryWarnData
|
|
|
|
// NewO11yQueryWarnData instantiates a new O11yQueryWarnData 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 NewO11yQueryWarnData() *O11yQueryWarnData {
|
|
this := O11yQueryWarnData{}
|
|
return &this
|
|
}
|
|
|
|
// NewO11yQueryWarnDataWithDefaults instantiates a new O11yQueryWarnData 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 NewO11yQueryWarnDataWithDefaults() *O11yQueryWarnData {
|
|
this := O11yQueryWarnData{}
|
|
return &this
|
|
}
|
|
|
|
// GetMessage returns the Message field value if set, zero value otherwise.
|
|
func (o *O11yQueryWarnData) GetMessage() string {
|
|
if o == nil || IsNil(o.Message) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Message
|
|
}
|
|
|
|
// GetMessageOk returns a tuple with the Message field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *O11yQueryWarnData) GetMessageOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Message) {
|
|
return nil, false
|
|
}
|
|
return o.Message, true
|
|
}
|
|
|
|
// HasMessage returns a boolean if a field has been set.
|
|
func (o *O11yQueryWarnData) HasMessage() bool {
|
|
if o != nil && !IsNil(o.Message) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetMessage gets a reference to the given string and assigns it to the Message field.
|
|
func (o *O11yQueryWarnData) SetMessage(v string) {
|
|
o.Message = &v
|
|
}
|
|
|
|
// GetUrl returns the Url field value if set, zero value otherwise.
|
|
func (o *O11yQueryWarnData) GetUrl() string {
|
|
if o == nil || IsNil(o.Url) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Url
|
|
}
|
|
|
|
// GetUrlOk returns a tuple with the Url field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *O11yQueryWarnData) GetUrlOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Url) {
|
|
return nil, false
|
|
}
|
|
return o.Url, true
|
|
}
|
|
|
|
// HasUrl returns a boolean if a field has been set.
|
|
func (o *O11yQueryWarnData) HasUrl() bool {
|
|
if o != nil && !IsNil(o.Url) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetUrl gets a reference to the given string and assigns it to the Url field.
|
|
func (o *O11yQueryWarnData) SetUrl(v string) {
|
|
o.Url = &v
|
|
}
|
|
|
|
// GetWarnings returns the Warnings field value if set, zero value otherwise.
|
|
func (o *O11yQueryWarnData) GetWarnings() []O11yQueryWarnDataAdditional {
|
|
if o == nil || IsNil(o.Warnings) {
|
|
var ret []O11yQueryWarnDataAdditional
|
|
return ret
|
|
}
|
|
return o.Warnings
|
|
}
|
|
|
|
// GetWarningsOk returns a tuple with the Warnings field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *O11yQueryWarnData) GetWarningsOk() ([]O11yQueryWarnDataAdditional, bool) {
|
|
if o == nil || IsNil(o.Warnings) {
|
|
return nil, false
|
|
}
|
|
return o.Warnings, true
|
|
}
|
|
|
|
// HasWarnings returns a boolean if a field has been set.
|
|
func (o *O11yQueryWarnData) HasWarnings() bool {
|
|
if o != nil && !IsNil(o.Warnings) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetWarnings gets a reference to the given []O11yQueryWarnDataAdditional and assigns it to the Warnings field.
|
|
func (o *O11yQueryWarnData) SetWarnings(v []O11yQueryWarnDataAdditional) {
|
|
o.Warnings = v
|
|
}
|
|
|
|
func (o O11yQueryWarnData) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o O11yQueryWarnData) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Message) {
|
|
toSerialize["message"] = o.Message
|
|
}
|
|
if !IsNil(o.Url) {
|
|
toSerialize["url"] = o.Url
|
|
}
|
|
if !IsNil(o.Warnings) {
|
|
toSerialize["warnings"] = o.Warnings
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *O11yQueryWarnData) UnmarshalJSON(data []byte) (err error) {
|
|
varO11yQueryWarnData := _O11yQueryWarnData{}
|
|
|
|
err = json.Unmarshal(data, &varO11yQueryWarnData)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = O11yQueryWarnData(varO11yQueryWarnData)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "message")
|
|
delete(additionalProperties, "url")
|
|
delete(additionalProperties, "warnings")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableO11yQueryWarnData struct {
|
|
value *O11yQueryWarnData
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableO11yQueryWarnData) Get() *O11yQueryWarnData {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableO11yQueryWarnData) Set(val *O11yQueryWarnData) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableO11yQueryWarnData) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableO11yQueryWarnData) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableO11yQueryWarnData(val *O11yQueryWarnData) *NullableO11yQueryWarnData {
|
|
return &NullableO11yQueryWarnData{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableO11yQueryWarnData) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableO11yQueryWarnData) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|