Files
sdk/model_settings_settings_req.go

231 lines
6.8 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 SettingsSettingsReq type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &SettingsSettingsReq{}
// SettingsSettingsReq struct for SettingsSettingsReq
type SettingsSettingsReq struct {
// Config is the product's non-secret configuration, stored verbatim. Bounded at 64 KiB once serialized. Omit it to store an empty object.
Config map[string]interface{} `json:"config,omitempty"`
// Product is the catalog slug, from the PATH. zip binds the path last, so the URL names the product being written whatever a body field claims.
Product *string `json:"product,omitempty"`
// Secrets are the secret fields, by name. Each VALUE is sealed into KMS and never reaches this deployment's database; a value that is empty or equal to the mask the read path returns means \"unchanged\" and is skipped, so a console round-trip cannot blank a stored secret. A key must match ^[a-z0-9][a-z0-9._-]{0,62}$, a value is bounded at 8 KiB, and an org may hold at most 64 secret fields per product.
Secrets map[string]string `json:"secrets,omitempty"`
AdditionalProperties map[string]interface{}
}
type _SettingsSettingsReq SettingsSettingsReq
// NewSettingsSettingsReq instantiates a new SettingsSettingsReq 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 NewSettingsSettingsReq() *SettingsSettingsReq {
this := SettingsSettingsReq{}
return &this
}
// NewSettingsSettingsReqWithDefaults instantiates a new SettingsSettingsReq 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 NewSettingsSettingsReqWithDefaults() *SettingsSettingsReq {
this := SettingsSettingsReq{}
return &this
}
// GetConfig returns the Config field value if set, zero value otherwise.
func (o *SettingsSettingsReq) GetConfig() map[string]interface{} {
if o == nil || IsNil(o.Config) {
var ret map[string]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.
func (o *SettingsSettingsReq) GetConfigOk() (map[string]interface{}, bool) {
if o == nil || IsNil(o.Config) {
return map[string]interface{}{}, false
}
return o.Config, true
}
// HasConfig returns a boolean if a field has been set.
func (o *SettingsSettingsReq) HasConfig() bool {
if o != nil && !IsNil(o.Config) {
return true
}
return false
}
// SetConfig gets a reference to the given map[string]interface{} and assigns it to the Config field.
func (o *SettingsSettingsReq) SetConfig(v map[string]interface{}) {
o.Config = v
}
// GetProduct returns the Product field value if set, zero value otherwise.
func (o *SettingsSettingsReq) 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 *SettingsSettingsReq) 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 *SettingsSettingsReq) 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 *SettingsSettingsReq) SetProduct(v string) {
o.Product = &v
}
// GetSecrets returns the Secrets field value if set, zero value otherwise.
func (o *SettingsSettingsReq) GetSecrets() map[string]string {
if o == nil || IsNil(o.Secrets) {
var ret map[string]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 *SettingsSettingsReq) GetSecretsOk() (map[string]string, bool) {
if o == nil || IsNil(o.Secrets) {
return map[string]string{}, false
}
return o.Secrets, true
}
// HasSecrets returns a boolean if a field has been set.
func (o *SettingsSettingsReq) HasSecrets() bool {
if o != nil && !IsNil(o.Secrets) {
return true
}
return false
}
// SetSecrets gets a reference to the given map[string]string and assigns it to the Secrets field.
func (o *SettingsSettingsReq) SetSecrets(v map[string]string) {
o.Secrets = v
}
func (o SettingsSettingsReq) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o SettingsSettingsReq) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Config) {
toSerialize["config"] = o.Config
}
if !IsNil(o.Product) {
toSerialize["product"] = o.Product
}
if !IsNil(o.Secrets) {
toSerialize["secrets"] = o.Secrets
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *SettingsSettingsReq) UnmarshalJSON(data []byte) (err error) {
varSettingsSettingsReq := _SettingsSettingsReq{}
err = json.Unmarshal(data, &varSettingsSettingsReq)
if err != nil {
return err
}
*o = SettingsSettingsReq(varSettingsSettingsReq)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "config")
delete(additionalProperties, "product")
delete(additionalProperties, "secrets")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableSettingsSettingsReq struct {
value *SettingsSettingsReq
isSet bool
}
func (v NullableSettingsSettingsReq) Get() *SettingsSettingsReq {
return v.value
}
func (v *NullableSettingsSettingsReq) Set(val *SettingsSettingsReq) {
v.value = val
v.isSet = true
}
func (v NullableSettingsSettingsReq) IsSet() bool {
return v.isSet
}
func (v *NullableSettingsSettingsReq) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableSettingsSettingsReq(val *SettingsSettingsReq) *NullableSettingsSettingsReq {
return &NullableSettingsSettingsReq{value: val, isSet: true}
}
func (v NullableSettingsSettingsReq) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableSettingsSettingsReq) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}