mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
228 lines
5.3 KiB
Go
228 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 O11yHost type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &O11yHost{}
|
|
|
|
// O11yHost struct for O11yHost
|
|
type O11yHost struct {
|
|
IsDefault *bool `json:"is_default,omitempty"`
|
|
Name *string `json:"name,omitempty"`
|
|
Url *string `json:"url,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _O11yHost O11yHost
|
|
|
|
// NewO11yHost instantiates a new O11yHost 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 NewO11yHost() *O11yHost {
|
|
this := O11yHost{}
|
|
return &this
|
|
}
|
|
|
|
// NewO11yHostWithDefaults instantiates a new O11yHost 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 NewO11yHostWithDefaults() *O11yHost {
|
|
this := O11yHost{}
|
|
return &this
|
|
}
|
|
|
|
// GetIsDefault returns the IsDefault field value if set, zero value otherwise.
|
|
func (o *O11yHost) GetIsDefault() bool {
|
|
if o == nil || IsNil(o.IsDefault) {
|
|
var ret bool
|
|
return ret
|
|
}
|
|
return *o.IsDefault
|
|
}
|
|
|
|
// GetIsDefaultOk returns a tuple with the IsDefault field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *O11yHost) GetIsDefaultOk() (*bool, bool) {
|
|
if o == nil || IsNil(o.IsDefault) {
|
|
return nil, false
|
|
}
|
|
return o.IsDefault, true
|
|
}
|
|
|
|
// HasIsDefault returns a boolean if a field has been set.
|
|
func (o *O11yHost) HasIsDefault() bool {
|
|
if o != nil && !IsNil(o.IsDefault) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetIsDefault gets a reference to the given bool and assigns it to the IsDefault field.
|
|
func (o *O11yHost) SetIsDefault(v bool) {
|
|
o.IsDefault = &v
|
|
}
|
|
|
|
// GetName returns the Name field value if set, zero value otherwise.
|
|
func (o *O11yHost) GetName() string {
|
|
if o == nil || IsNil(o.Name) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Name
|
|
}
|
|
|
|
// GetNameOk returns a tuple with the Name field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *O11yHost) GetNameOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Name) {
|
|
return nil, false
|
|
}
|
|
return o.Name, true
|
|
}
|
|
|
|
// HasName returns a boolean if a field has been set.
|
|
func (o *O11yHost) HasName() bool {
|
|
if o != nil && !IsNil(o.Name) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetName gets a reference to the given string and assigns it to the Name field.
|
|
func (o *O11yHost) SetName(v string) {
|
|
o.Name = &v
|
|
}
|
|
|
|
// GetUrl returns the Url field value if set, zero value otherwise.
|
|
func (o *O11yHost) 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 *O11yHost) 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 *O11yHost) 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 *O11yHost) SetUrl(v string) {
|
|
o.Url = &v
|
|
}
|
|
|
|
func (o O11yHost) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o O11yHost) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.IsDefault) {
|
|
toSerialize["is_default"] = o.IsDefault
|
|
}
|
|
if !IsNil(o.Name) {
|
|
toSerialize["name"] = o.Name
|
|
}
|
|
if !IsNil(o.Url) {
|
|
toSerialize["url"] = o.Url
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *O11yHost) UnmarshalJSON(data []byte) (err error) {
|
|
varO11yHost := _O11yHost{}
|
|
|
|
err = json.Unmarshal(data, &varO11yHost)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = O11yHost(varO11yHost)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "is_default")
|
|
delete(additionalProperties, "name")
|
|
delete(additionalProperties, "url")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableO11yHost struct {
|
|
value *O11yHost
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableO11yHost) Get() *O11yHost {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableO11yHost) Set(val *O11yHost) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableO11yHost) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableO11yHost) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableO11yHost(val *O11yHost) *NullableO11yHost {
|
|
return &NullableO11yHost{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableO11yHost) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableO11yHost) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|