Files
sdk/model_tool_plugin_mount.go

231 lines
5.9 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 ToolPluginMount type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &ToolPluginMount{}
// ToolPluginMount struct for ToolPluginMount
type ToolPluginMount struct {
// Enabled is whether this subsystem is switched on in this deployment.
Enabled *bool `json:"enabled,omitempty"`
// Name is the subsystem's name, the same label a traced request resolves to.
Name *string `json:"name,omitempty"`
// Prefixes are the URL prefixes this subsystem serves.
Prefixes []string `json:"prefixes,omitempty"`
AdditionalProperties map[string]interface{}
}
type _ToolPluginMount ToolPluginMount
// NewToolPluginMount instantiates a new ToolPluginMount 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 NewToolPluginMount() *ToolPluginMount {
this := ToolPluginMount{}
return &this
}
// NewToolPluginMountWithDefaults instantiates a new ToolPluginMount 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 NewToolPluginMountWithDefaults() *ToolPluginMount {
this := ToolPluginMount{}
return &this
}
// GetEnabled returns the Enabled field value if set, zero value otherwise.
func (o *ToolPluginMount) 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 *ToolPluginMount) 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 *ToolPluginMount) 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 *ToolPluginMount) SetEnabled(v bool) {
o.Enabled = &v
}
// GetName returns the Name field value if set, zero value otherwise.
func (o *ToolPluginMount) 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 *ToolPluginMount) 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 *ToolPluginMount) 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 *ToolPluginMount) SetName(v string) {
o.Name = &v
}
// GetPrefixes returns the Prefixes field value if set, zero value otherwise.
func (o *ToolPluginMount) GetPrefixes() []string {
if o == nil || IsNil(o.Prefixes) {
var ret []string
return ret
}
return o.Prefixes
}
// GetPrefixesOk returns a tuple with the Prefixes field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ToolPluginMount) GetPrefixesOk() ([]string, bool) {
if o == nil || IsNil(o.Prefixes) {
return nil, false
}
return o.Prefixes, true
}
// HasPrefixes returns a boolean if a field has been set.
func (o *ToolPluginMount) HasPrefixes() bool {
if o != nil && !IsNil(o.Prefixes) {
return true
}
return false
}
// SetPrefixes gets a reference to the given []string and assigns it to the Prefixes field.
func (o *ToolPluginMount) SetPrefixes(v []string) {
o.Prefixes = v
}
func (o ToolPluginMount) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o ToolPluginMount) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Enabled) {
toSerialize["enabled"] = o.Enabled
}
if !IsNil(o.Name) {
toSerialize["name"] = o.Name
}
if !IsNil(o.Prefixes) {
toSerialize["prefixes"] = o.Prefixes
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *ToolPluginMount) UnmarshalJSON(data []byte) (err error) {
varToolPluginMount := _ToolPluginMount{}
err = json.Unmarshal(data, &varToolPluginMount)
if err != nil {
return err
}
*o = ToolPluginMount(varToolPluginMount)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "enabled")
delete(additionalProperties, "name")
delete(additionalProperties, "prefixes")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableToolPluginMount struct {
value *ToolPluginMount
isSet bool
}
func (v NullableToolPluginMount) Get() *ToolPluginMount {
return v.value
}
func (v *NullableToolPluginMount) Set(val *ToolPluginMount) {
v.value = val
v.isSet = true
}
func (v NullableToolPluginMount) IsSet() bool {
return v.isSet
}
func (v *NullableToolPluginMount) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableToolPluginMount(val *ToolPluginMount) *NullableToolPluginMount {
return &NullableToolPluginMount{value: val, isSet: true}
}
func (v NullableToolPluginMount) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableToolPluginMount) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}