mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
307 lines
8.2 KiB
Go
307 lines
8.2 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 SettingsView type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &SettingsView{}
|
|
|
|
// SettingsView struct for SettingsView
|
|
type SettingsView struct {
|
|
Config interface{} `json:"config,omitempty"`
|
|
// CreatedAt is when this configuration was first written, RFC 3339 UTC.
|
|
CreatedAt *string `json:"createdAt,omitempty"`
|
|
// Product is the catalog slug this configuration belongs to.
|
|
Product *string `json:"product,omitempty"`
|
|
// SecretKeys names the secret fields that ARE set. Their VALUES live only in KMS and are never returned here — the console renders a mask.
|
|
SecretKeys []string `json:"secretKeys,omitempty"`
|
|
// UpdatedAt is when this configuration was last written, RFC 3339 UTC. Empty when nothing has been saved.
|
|
UpdatedAt *string `json:"updatedAt,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _SettingsView SettingsView
|
|
|
|
// NewSettingsView instantiates a new SettingsView 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 NewSettingsView() *SettingsView {
|
|
this := SettingsView{}
|
|
return &this
|
|
}
|
|
|
|
// NewSettingsViewWithDefaults instantiates a new SettingsView 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 NewSettingsViewWithDefaults() *SettingsView {
|
|
this := SettingsView{}
|
|
return &this
|
|
}
|
|
|
|
// GetConfig returns the Config field value if set, zero value otherwise (both if not set or set to explicit null).
|
|
func (o *SettingsView) GetConfig() interface{} {
|
|
if o == nil {
|
|
var ret interface{}
|
|
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.
|
|
// NOTE: If the value is an explicit nil, `nil, true` will be returned
|
|
func (o *SettingsView) GetConfigOk() (*interface{}, bool) {
|
|
if o == nil || IsNil(o.Config) {
|
|
return nil, false
|
|
}
|
|
return &o.Config, true
|
|
}
|
|
|
|
// HasConfig returns a boolean if a field has been set.
|
|
func (o *SettingsView) HasConfig() bool {
|
|
if o != nil && !IsNil(o.Config) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetConfig gets a reference to the given interface{} and assigns it to the Config field.
|
|
func (o *SettingsView) SetConfig(v interface{}) {
|
|
o.Config = v
|
|
}
|
|
|
|
// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise.
|
|
func (o *SettingsView) GetCreatedAt() string {
|
|
if o == nil || IsNil(o.CreatedAt) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.CreatedAt
|
|
}
|
|
|
|
// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *SettingsView) GetCreatedAtOk() (*string, bool) {
|
|
if o == nil || IsNil(o.CreatedAt) {
|
|
return nil, false
|
|
}
|
|
return o.CreatedAt, true
|
|
}
|
|
|
|
// HasCreatedAt returns a boolean if a field has been set.
|
|
func (o *SettingsView) HasCreatedAt() bool {
|
|
if o != nil && !IsNil(o.CreatedAt) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetCreatedAt gets a reference to the given string and assigns it to the CreatedAt field.
|
|
func (o *SettingsView) SetCreatedAt(v string) {
|
|
o.CreatedAt = &v
|
|
}
|
|
|
|
// GetProduct returns the Product field value if set, zero value otherwise.
|
|
func (o *SettingsView) GetProduct() string {
|
|
if o == nil || IsNil(o.Product) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Product
|
|
}
|
|
|
|
// GetProductOk returns a tuple with the Product field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *SettingsView) GetProductOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Product) {
|
|
return nil, false
|
|
}
|
|
return o.Product, true
|
|
}
|
|
|
|
// HasProduct returns a boolean if a field has been set.
|
|
func (o *SettingsView) HasProduct() bool {
|
|
if o != nil && !IsNil(o.Product) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetProduct gets a reference to the given string and assigns it to the Product field.
|
|
func (o *SettingsView) SetProduct(v string) {
|
|
o.Product = &v
|
|
}
|
|
|
|
// GetSecretKeys returns the SecretKeys field value if set, zero value otherwise.
|
|
func (o *SettingsView) GetSecretKeys() []string {
|
|
if o == nil || IsNil(o.SecretKeys) {
|
|
var ret []string
|
|
return ret
|
|
}
|
|
return o.SecretKeys
|
|
}
|
|
|
|
// GetSecretKeysOk returns a tuple with the SecretKeys field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *SettingsView) GetSecretKeysOk() ([]string, bool) {
|
|
if o == nil || IsNil(o.SecretKeys) {
|
|
return nil, false
|
|
}
|
|
return o.SecretKeys, true
|
|
}
|
|
|
|
// HasSecretKeys returns a boolean if a field has been set.
|
|
func (o *SettingsView) HasSecretKeys() bool {
|
|
if o != nil && !IsNil(o.SecretKeys) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetSecretKeys gets a reference to the given []string and assigns it to the SecretKeys field.
|
|
func (o *SettingsView) SetSecretKeys(v []string) {
|
|
o.SecretKeys = v
|
|
}
|
|
|
|
// GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise.
|
|
func (o *SettingsView) GetUpdatedAt() string {
|
|
if o == nil || IsNil(o.UpdatedAt) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.UpdatedAt
|
|
}
|
|
|
|
// GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *SettingsView) GetUpdatedAtOk() (*string, bool) {
|
|
if o == nil || IsNil(o.UpdatedAt) {
|
|
return nil, false
|
|
}
|
|
return o.UpdatedAt, true
|
|
}
|
|
|
|
// HasUpdatedAt returns a boolean if a field has been set.
|
|
func (o *SettingsView) HasUpdatedAt() bool {
|
|
if o != nil && !IsNil(o.UpdatedAt) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetUpdatedAt gets a reference to the given string and assigns it to the UpdatedAt field.
|
|
func (o *SettingsView) SetUpdatedAt(v string) {
|
|
o.UpdatedAt = &v
|
|
}
|
|
|
|
func (o SettingsView) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o SettingsView) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if o.Config != nil {
|
|
toSerialize["config"] = o.Config
|
|
}
|
|
if !IsNil(o.CreatedAt) {
|
|
toSerialize["createdAt"] = o.CreatedAt
|
|
}
|
|
if !IsNil(o.Product) {
|
|
toSerialize["product"] = o.Product
|
|
}
|
|
if !IsNil(o.SecretKeys) {
|
|
toSerialize["secretKeys"] = o.SecretKeys
|
|
}
|
|
if !IsNil(o.UpdatedAt) {
|
|
toSerialize["updatedAt"] = o.UpdatedAt
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *SettingsView) UnmarshalJSON(data []byte) (err error) {
|
|
varSettingsView := _SettingsView{}
|
|
|
|
err = json.Unmarshal(data, &varSettingsView)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = SettingsView(varSettingsView)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "config")
|
|
delete(additionalProperties, "createdAt")
|
|
delete(additionalProperties, "product")
|
|
delete(additionalProperties, "secretKeys")
|
|
delete(additionalProperties, "updatedAt")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableSettingsView struct {
|
|
value *SettingsView
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableSettingsView) Get() *SettingsView {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableSettingsView) Set(val *SettingsView) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableSettingsView) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableSettingsView) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableSettingsView(val *SettingsView) *NullableSettingsView {
|
|
return &NullableSettingsView{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableSettingsView) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableSettingsView) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|