mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
524 lines
14 KiB
Go
524 lines
14 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 DestinationStatus type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &DestinationStatus{}
|
|
|
|
// DestinationStatus struct for DestinationStatus
|
|
type DestinationStatus struct {
|
|
Account *string `json:"account,omitempty"`
|
|
Category *string `json:"category,omitempty"`
|
|
Config map[string]string `json:"config,omitempty"`
|
|
Connected *bool `json:"connected,omitempty"`
|
|
Enabled *bool `json:"enabled,omitempty"`
|
|
Fields []DestinationField `json:"fields,omitempty"`
|
|
Live *bool `json:"live,omitempty"`
|
|
Name *string `json:"name,omitempty"`
|
|
Pixel *bool `json:"pixel,omitempty"`
|
|
Platform *string `json:"platform,omitempty"`
|
|
Secrets []string `json:"secrets,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _DestinationStatus DestinationStatus
|
|
|
|
// NewDestinationStatus instantiates a new DestinationStatus 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 NewDestinationStatus() *DestinationStatus {
|
|
this := DestinationStatus{}
|
|
return &this
|
|
}
|
|
|
|
// NewDestinationStatusWithDefaults instantiates a new DestinationStatus 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 NewDestinationStatusWithDefaults() *DestinationStatus {
|
|
this := DestinationStatus{}
|
|
return &this
|
|
}
|
|
|
|
// GetAccount returns the Account field value if set, zero value otherwise.
|
|
func (o *DestinationStatus) GetAccount() string {
|
|
if o == nil || IsNil(o.Account) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Account
|
|
}
|
|
|
|
// GetAccountOk returns a tuple with the Account field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *DestinationStatus) GetAccountOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Account) {
|
|
return nil, false
|
|
}
|
|
return o.Account, true
|
|
}
|
|
|
|
// HasAccount returns a boolean if a field has been set.
|
|
func (o *DestinationStatus) HasAccount() bool {
|
|
if o != nil && !IsNil(o.Account) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetAccount gets a reference to the given string and assigns it to the Account field.
|
|
func (o *DestinationStatus) SetAccount(v string) {
|
|
o.Account = &v
|
|
}
|
|
|
|
// GetCategory returns the Category field value if set, zero value otherwise.
|
|
func (o *DestinationStatus) GetCategory() string {
|
|
if o == nil || IsNil(o.Category) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Category
|
|
}
|
|
|
|
// GetCategoryOk returns a tuple with the Category field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *DestinationStatus) GetCategoryOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Category) {
|
|
return nil, false
|
|
}
|
|
return o.Category, true
|
|
}
|
|
|
|
// HasCategory returns a boolean if a field has been set.
|
|
func (o *DestinationStatus) HasCategory() bool {
|
|
if o != nil && !IsNil(o.Category) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetCategory gets a reference to the given string and assigns it to the Category field.
|
|
func (o *DestinationStatus) SetCategory(v string) {
|
|
o.Category = &v
|
|
}
|
|
|
|
// GetConfig returns the Config field value if set, zero value otherwise.
|
|
func (o *DestinationStatus) GetConfig() map[string]string {
|
|
if o == nil || IsNil(o.Config) {
|
|
var ret map[string]string
|
|
return ret
|
|
}
|
|
return o.Config
|
|
}
|
|
|
|
// GetConfigOk returns a tuple with the Config field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *DestinationStatus) GetConfigOk() (map[string]string, bool) {
|
|
if o == nil || IsNil(o.Config) {
|
|
return map[string]string{}, false
|
|
}
|
|
return o.Config, true
|
|
}
|
|
|
|
// HasConfig returns a boolean if a field has been set.
|
|
func (o *DestinationStatus) HasConfig() bool {
|
|
if o != nil && !IsNil(o.Config) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetConfig gets a reference to the given map[string]string and assigns it to the Config field.
|
|
func (o *DestinationStatus) SetConfig(v map[string]string) {
|
|
o.Config = v
|
|
}
|
|
|
|
// GetConnected returns the Connected field value if set, zero value otherwise.
|
|
func (o *DestinationStatus) GetConnected() bool {
|
|
if o == nil || IsNil(o.Connected) {
|
|
var ret bool
|
|
return ret
|
|
}
|
|
return *o.Connected
|
|
}
|
|
|
|
// GetConnectedOk returns a tuple with the Connected field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *DestinationStatus) GetConnectedOk() (*bool, bool) {
|
|
if o == nil || IsNil(o.Connected) {
|
|
return nil, false
|
|
}
|
|
return o.Connected, true
|
|
}
|
|
|
|
// HasConnected returns a boolean if a field has been set.
|
|
func (o *DestinationStatus) HasConnected() bool {
|
|
if o != nil && !IsNil(o.Connected) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetConnected gets a reference to the given bool and assigns it to the Connected field.
|
|
func (o *DestinationStatus) SetConnected(v bool) {
|
|
o.Connected = &v
|
|
}
|
|
|
|
// GetEnabled returns the Enabled field value if set, zero value otherwise.
|
|
func (o *DestinationStatus) GetEnabled() bool {
|
|
if o == nil || IsNil(o.Enabled) {
|
|
var ret bool
|
|
return ret
|
|
}
|
|
return *o.Enabled
|
|
}
|
|
|
|
// GetEnabledOk returns a tuple with the Enabled field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *DestinationStatus) GetEnabledOk() (*bool, bool) {
|
|
if o == nil || IsNil(o.Enabled) {
|
|
return nil, false
|
|
}
|
|
return o.Enabled, true
|
|
}
|
|
|
|
// HasEnabled returns a boolean if a field has been set.
|
|
func (o *DestinationStatus) HasEnabled() bool {
|
|
if o != nil && !IsNil(o.Enabled) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetEnabled gets a reference to the given bool and assigns it to the Enabled field.
|
|
func (o *DestinationStatus) SetEnabled(v bool) {
|
|
o.Enabled = &v
|
|
}
|
|
|
|
// GetFields returns the Fields field value if set, zero value otherwise.
|
|
func (o *DestinationStatus) GetFields() []DestinationField {
|
|
if o == nil || IsNil(o.Fields) {
|
|
var ret []DestinationField
|
|
return ret
|
|
}
|
|
return o.Fields
|
|
}
|
|
|
|
// GetFieldsOk returns a tuple with the Fields field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *DestinationStatus) GetFieldsOk() ([]DestinationField, bool) {
|
|
if o == nil || IsNil(o.Fields) {
|
|
return nil, false
|
|
}
|
|
return o.Fields, true
|
|
}
|
|
|
|
// HasFields returns a boolean if a field has been set.
|
|
func (o *DestinationStatus) HasFields() bool {
|
|
if o != nil && !IsNil(o.Fields) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetFields gets a reference to the given []DestinationField and assigns it to the Fields field.
|
|
func (o *DestinationStatus) SetFields(v []DestinationField) {
|
|
o.Fields = v
|
|
}
|
|
|
|
// GetLive returns the Live field value if set, zero value otherwise.
|
|
func (o *DestinationStatus) GetLive() bool {
|
|
if o == nil || IsNil(o.Live) {
|
|
var ret bool
|
|
return ret
|
|
}
|
|
return *o.Live
|
|
}
|
|
|
|
// GetLiveOk returns a tuple with the Live field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *DestinationStatus) GetLiveOk() (*bool, bool) {
|
|
if o == nil || IsNil(o.Live) {
|
|
return nil, false
|
|
}
|
|
return o.Live, true
|
|
}
|
|
|
|
// HasLive returns a boolean if a field has been set.
|
|
func (o *DestinationStatus) HasLive() bool {
|
|
if o != nil && !IsNil(o.Live) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetLive gets a reference to the given bool and assigns it to the Live field.
|
|
func (o *DestinationStatus) SetLive(v bool) {
|
|
o.Live = &v
|
|
}
|
|
|
|
// GetName returns the Name field value if set, zero value otherwise.
|
|
func (o *DestinationStatus) 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 *DestinationStatus) 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 *DestinationStatus) 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 *DestinationStatus) SetName(v string) {
|
|
o.Name = &v
|
|
}
|
|
|
|
// GetPixel returns the Pixel field value if set, zero value otherwise.
|
|
func (o *DestinationStatus) GetPixel() bool {
|
|
if o == nil || IsNil(o.Pixel) {
|
|
var ret bool
|
|
return ret
|
|
}
|
|
return *o.Pixel
|
|
}
|
|
|
|
// GetPixelOk returns a tuple with the Pixel field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *DestinationStatus) GetPixelOk() (*bool, bool) {
|
|
if o == nil || IsNil(o.Pixel) {
|
|
return nil, false
|
|
}
|
|
return o.Pixel, true
|
|
}
|
|
|
|
// HasPixel returns a boolean if a field has been set.
|
|
func (o *DestinationStatus) HasPixel() bool {
|
|
if o != nil && !IsNil(o.Pixel) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetPixel gets a reference to the given bool and assigns it to the Pixel field.
|
|
func (o *DestinationStatus) SetPixel(v bool) {
|
|
o.Pixel = &v
|
|
}
|
|
|
|
// GetPlatform returns the Platform field value if set, zero value otherwise.
|
|
func (o *DestinationStatus) GetPlatform() string {
|
|
if o == nil || IsNil(o.Platform) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Platform
|
|
}
|
|
|
|
// GetPlatformOk returns a tuple with the Platform field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *DestinationStatus) GetPlatformOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Platform) {
|
|
return nil, false
|
|
}
|
|
return o.Platform, true
|
|
}
|
|
|
|
// HasPlatform returns a boolean if a field has been set.
|
|
func (o *DestinationStatus) HasPlatform() bool {
|
|
if o != nil && !IsNil(o.Platform) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetPlatform gets a reference to the given string and assigns it to the Platform field.
|
|
func (o *DestinationStatus) SetPlatform(v string) {
|
|
o.Platform = &v
|
|
}
|
|
|
|
// GetSecrets returns the Secrets field value if set, zero value otherwise.
|
|
func (o *DestinationStatus) GetSecrets() []string {
|
|
if o == nil || IsNil(o.Secrets) {
|
|
var ret []string
|
|
return ret
|
|
}
|
|
return o.Secrets
|
|
}
|
|
|
|
// GetSecretsOk returns a tuple with the Secrets field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *DestinationStatus) GetSecretsOk() ([]string, bool) {
|
|
if o == nil || IsNil(o.Secrets) {
|
|
return nil, false
|
|
}
|
|
return o.Secrets, true
|
|
}
|
|
|
|
// HasSecrets returns a boolean if a field has been set.
|
|
func (o *DestinationStatus) HasSecrets() bool {
|
|
if o != nil && !IsNil(o.Secrets) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetSecrets gets a reference to the given []string and assigns it to the Secrets field.
|
|
func (o *DestinationStatus) SetSecrets(v []string) {
|
|
o.Secrets = v
|
|
}
|
|
|
|
func (o DestinationStatus) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o DestinationStatus) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Account) {
|
|
toSerialize["account"] = o.Account
|
|
}
|
|
if !IsNil(o.Category) {
|
|
toSerialize["category"] = o.Category
|
|
}
|
|
if !IsNil(o.Config) {
|
|
toSerialize["config"] = o.Config
|
|
}
|
|
if !IsNil(o.Connected) {
|
|
toSerialize["connected"] = o.Connected
|
|
}
|
|
if !IsNil(o.Enabled) {
|
|
toSerialize["enabled"] = o.Enabled
|
|
}
|
|
if !IsNil(o.Fields) {
|
|
toSerialize["fields"] = o.Fields
|
|
}
|
|
if !IsNil(o.Live) {
|
|
toSerialize["live"] = o.Live
|
|
}
|
|
if !IsNil(o.Name) {
|
|
toSerialize["name"] = o.Name
|
|
}
|
|
if !IsNil(o.Pixel) {
|
|
toSerialize["pixel"] = o.Pixel
|
|
}
|
|
if !IsNil(o.Platform) {
|
|
toSerialize["platform"] = o.Platform
|
|
}
|
|
if !IsNil(o.Secrets) {
|
|
toSerialize["secrets"] = o.Secrets
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *DestinationStatus) UnmarshalJSON(data []byte) (err error) {
|
|
varDestinationStatus := _DestinationStatus{}
|
|
|
|
err = json.Unmarshal(data, &varDestinationStatus)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = DestinationStatus(varDestinationStatus)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "account")
|
|
delete(additionalProperties, "category")
|
|
delete(additionalProperties, "config")
|
|
delete(additionalProperties, "connected")
|
|
delete(additionalProperties, "enabled")
|
|
delete(additionalProperties, "fields")
|
|
delete(additionalProperties, "live")
|
|
delete(additionalProperties, "name")
|
|
delete(additionalProperties, "pixel")
|
|
delete(additionalProperties, "platform")
|
|
delete(additionalProperties, "secrets")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableDestinationStatus struct {
|
|
value *DestinationStatus
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableDestinationStatus) Get() *DestinationStatus {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableDestinationStatus) Set(val *DestinationStatus) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableDestinationStatus) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableDestinationStatus) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableDestinationStatus(val *DestinationStatus) *NullableDestinationStatus {
|
|
return &NullableDestinationStatus{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableDestinationStatus) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableDestinationStatus) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|