Files
sdk/model_kms_kms_config.go

269 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 KmsKmsConfig type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &KmsKmsConfig{}
// KmsKmsConfig struct for KmsKmsConfig
type KmsKmsConfig struct {
// APIBase is this subsystem's own prefix, `/v1/kms`.
ApiBase *string `json:"apiBase,omitempty"`
// Brand is the deployment's brand, so the console renders as the right product.
Brand *string `json:"brand,omitempty"`
// Issuer is the OIDC issuer the console authenticates against.
Issuer *string `json:"issuer,omitempty"`
// LoginPath is the credential exchange's address.
LoginPath *string `json:"loginPath,omitempty"`
AdditionalProperties map[string]interface{}
}
type _KmsKmsConfig KmsKmsConfig
// NewKmsKmsConfig instantiates a new KmsKmsConfig 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 NewKmsKmsConfig() *KmsKmsConfig {
this := KmsKmsConfig{}
return &this
}
// NewKmsKmsConfigWithDefaults instantiates a new KmsKmsConfig 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 NewKmsKmsConfigWithDefaults() *KmsKmsConfig {
this := KmsKmsConfig{}
return &this
}
// GetApiBase returns the ApiBase field value if set, zero value otherwise.
func (o *KmsKmsConfig) GetApiBase() string {
if o == nil || IsNil(o.ApiBase) {
var ret string
return ret
}
return *o.ApiBase
}
// GetApiBaseOk returns a tuple with the ApiBase field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *KmsKmsConfig) GetApiBaseOk() (*string, bool) {
if o == nil || IsNil(o.ApiBase) {
return nil, false
}
return o.ApiBase, true
}
// HasApiBase returns a boolean if a field has been set.
func (o *KmsKmsConfig) HasApiBase() bool {
if o != nil && !IsNil(o.ApiBase) {
return true
}
return false
}
// SetApiBase gets a reference to the given string and assigns it to the ApiBase field.
func (o *KmsKmsConfig) SetApiBase(v string) {
o.ApiBase = &v
}
// GetBrand returns the Brand field value if set, zero value otherwise.
func (o *KmsKmsConfig) GetBrand() string {
if o == nil || IsNil(o.Brand) {
var ret string
return ret
}
return *o.Brand
}
// GetBrandOk returns a tuple with the Brand field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *KmsKmsConfig) GetBrandOk() (*string, bool) {
if o == nil || IsNil(o.Brand) {
return nil, false
}
return o.Brand, true
}
// HasBrand returns a boolean if a field has been set.
func (o *KmsKmsConfig) HasBrand() bool {
if o != nil && !IsNil(o.Brand) {
return true
}
return false
}
// SetBrand gets a reference to the given string and assigns it to the Brand field.
func (o *KmsKmsConfig) SetBrand(v string) {
o.Brand = &v
}
// GetIssuer returns the Issuer field value if set, zero value otherwise.
func (o *KmsKmsConfig) GetIssuer() string {
if o == nil || IsNil(o.Issuer) {
var ret string
return ret
}
return *o.Issuer
}
// GetIssuerOk returns a tuple with the Issuer field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *KmsKmsConfig) GetIssuerOk() (*string, bool) {
if o == nil || IsNil(o.Issuer) {
return nil, false
}
return o.Issuer, true
}
// HasIssuer returns a boolean if a field has been set.
func (o *KmsKmsConfig) HasIssuer() bool {
if o != nil && !IsNil(o.Issuer) {
return true
}
return false
}
// SetIssuer gets a reference to the given string and assigns it to the Issuer field.
func (o *KmsKmsConfig) SetIssuer(v string) {
o.Issuer = &v
}
// GetLoginPath returns the LoginPath field value if set, zero value otherwise.
func (o *KmsKmsConfig) GetLoginPath() string {
if o == nil || IsNil(o.LoginPath) {
var ret string
return ret
}
return *o.LoginPath
}
// GetLoginPathOk returns a tuple with the LoginPath field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *KmsKmsConfig) GetLoginPathOk() (*string, bool) {
if o == nil || IsNil(o.LoginPath) {
return nil, false
}
return o.LoginPath, true
}
// HasLoginPath returns a boolean if a field has been set.
func (o *KmsKmsConfig) HasLoginPath() bool {
if o != nil && !IsNil(o.LoginPath) {
return true
}
return false
}
// SetLoginPath gets a reference to the given string and assigns it to the LoginPath field.
func (o *KmsKmsConfig) SetLoginPath(v string) {
o.LoginPath = &v
}
func (o KmsKmsConfig) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o KmsKmsConfig) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.ApiBase) {
toSerialize["apiBase"] = o.ApiBase
}
if !IsNil(o.Brand) {
toSerialize["brand"] = o.Brand
}
if !IsNil(o.Issuer) {
toSerialize["issuer"] = o.Issuer
}
if !IsNil(o.LoginPath) {
toSerialize["loginPath"] = o.LoginPath
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *KmsKmsConfig) UnmarshalJSON(data []byte) (err error) {
varKmsKmsConfig := _KmsKmsConfig{}
err = json.Unmarshal(data, &varKmsKmsConfig)
if err != nil {
return err
}
*o = KmsKmsConfig(varKmsKmsConfig)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "apiBase")
delete(additionalProperties, "brand")
delete(additionalProperties, "issuer")
delete(additionalProperties, "loginPath")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableKmsKmsConfig struct {
value *KmsKmsConfig
isSet bool
}
func (v NullableKmsKmsConfig) Get() *KmsKmsConfig {
return v.value
}
func (v *NullableKmsKmsConfig) Set(val *KmsKmsConfig) {
v.value = val
v.isSet = true
}
func (v NullableKmsKmsConfig) IsSet() bool {
return v.isSet
}
func (v *NullableKmsKmsConfig) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableKmsKmsConfig(val *KmsKmsConfig) *NullableKmsKmsConfig {
return &NullableKmsKmsConfig{value: val, isSet: true}
}
func (v NullableKmsKmsConfig) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableKmsKmsConfig) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}