mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
231 lines
6.1 KiB
Go
231 lines
6.1 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 FunctionSecretView type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &FunctionSecretView{}
|
|
|
|
// FunctionSecretView struct for FunctionSecretView
|
|
type FunctionSecretView struct {
|
|
// MountedBy is a function that mounts it.
|
|
MountedBy *string `json:"mountedBy,omitempty"`
|
|
// Name is the environment variable the function mounts.
|
|
Name *string `json:"name,omitempty"`
|
|
// Namespace is the group the mounting function belongs to.
|
|
Namespace *string `json:"namespace,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _FunctionSecretView FunctionSecretView
|
|
|
|
// NewFunctionSecretView instantiates a new FunctionSecretView 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 NewFunctionSecretView() *FunctionSecretView {
|
|
this := FunctionSecretView{}
|
|
return &this
|
|
}
|
|
|
|
// NewFunctionSecretViewWithDefaults instantiates a new FunctionSecretView 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 NewFunctionSecretViewWithDefaults() *FunctionSecretView {
|
|
this := FunctionSecretView{}
|
|
return &this
|
|
}
|
|
|
|
// GetMountedBy returns the MountedBy field value if set, zero value otherwise.
|
|
func (o *FunctionSecretView) GetMountedBy() string {
|
|
if o == nil || IsNil(o.MountedBy) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.MountedBy
|
|
}
|
|
|
|
// GetMountedByOk returns a tuple with the MountedBy field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *FunctionSecretView) GetMountedByOk() (*string, bool) {
|
|
if o == nil || IsNil(o.MountedBy) {
|
|
return nil, false
|
|
}
|
|
return o.MountedBy, true
|
|
}
|
|
|
|
// HasMountedBy returns a boolean if a field has been set.
|
|
func (o *FunctionSecretView) HasMountedBy() bool {
|
|
if o != nil && !IsNil(o.MountedBy) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetMountedBy gets a reference to the given string and assigns it to the MountedBy field.
|
|
func (o *FunctionSecretView) SetMountedBy(v string) {
|
|
o.MountedBy = &v
|
|
}
|
|
|
|
// GetName returns the Name field value if set, zero value otherwise.
|
|
func (o *FunctionSecretView) 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 *FunctionSecretView) 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 *FunctionSecretView) 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 *FunctionSecretView) SetName(v string) {
|
|
o.Name = &v
|
|
}
|
|
|
|
// GetNamespace returns the Namespace field value if set, zero value otherwise.
|
|
func (o *FunctionSecretView) GetNamespace() string {
|
|
if o == nil || IsNil(o.Namespace) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Namespace
|
|
}
|
|
|
|
// GetNamespaceOk returns a tuple with the Namespace field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *FunctionSecretView) GetNamespaceOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Namespace) {
|
|
return nil, false
|
|
}
|
|
return o.Namespace, true
|
|
}
|
|
|
|
// HasNamespace returns a boolean if a field has been set.
|
|
func (o *FunctionSecretView) HasNamespace() bool {
|
|
if o != nil && !IsNil(o.Namespace) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetNamespace gets a reference to the given string and assigns it to the Namespace field.
|
|
func (o *FunctionSecretView) SetNamespace(v string) {
|
|
o.Namespace = &v
|
|
}
|
|
|
|
func (o FunctionSecretView) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o FunctionSecretView) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.MountedBy) {
|
|
toSerialize["mountedBy"] = o.MountedBy
|
|
}
|
|
if !IsNil(o.Name) {
|
|
toSerialize["name"] = o.Name
|
|
}
|
|
if !IsNil(o.Namespace) {
|
|
toSerialize["namespace"] = o.Namespace
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *FunctionSecretView) UnmarshalJSON(data []byte) (err error) {
|
|
varFunctionSecretView := _FunctionSecretView{}
|
|
|
|
err = json.Unmarshal(data, &varFunctionSecretView)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = FunctionSecretView(varFunctionSecretView)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "mountedBy")
|
|
delete(additionalProperties, "name")
|
|
delete(additionalProperties, "namespace")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableFunctionSecretView struct {
|
|
value *FunctionSecretView
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableFunctionSecretView) Get() *FunctionSecretView {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableFunctionSecretView) Set(val *FunctionSecretView) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableFunctionSecretView) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableFunctionSecretView) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableFunctionSecretView(val *FunctionSecretView) *NullableFunctionSecretView {
|
|
return &NullableFunctionSecretView{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableFunctionSecretView) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableFunctionSecretView) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|