mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
228 lines
5.8 KiB
Go
228 lines
5.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 AgentMcpTools type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &AgentMcpTools{}
|
|
|
|
// AgentMcpTools struct for AgentMcpTools
|
|
type AgentMcpTools struct {
|
|
IsEnabled *bool `json:"isEnabled,omitempty"`
|
|
ServerName *string `json:"serverName,omitempty"`
|
|
Tools *string `json:"tools,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _AgentMcpTools AgentMcpTools
|
|
|
|
// NewAgentMcpTools instantiates a new AgentMcpTools 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 NewAgentMcpTools() *AgentMcpTools {
|
|
this := AgentMcpTools{}
|
|
return &this
|
|
}
|
|
|
|
// NewAgentMcpToolsWithDefaults instantiates a new AgentMcpTools 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 NewAgentMcpToolsWithDefaults() *AgentMcpTools {
|
|
this := AgentMcpTools{}
|
|
return &this
|
|
}
|
|
|
|
// GetIsEnabled returns the IsEnabled field value if set, zero value otherwise.
|
|
func (o *AgentMcpTools) GetIsEnabled() bool {
|
|
if o == nil || IsNil(o.IsEnabled) {
|
|
var ret bool
|
|
return ret
|
|
}
|
|
return *o.IsEnabled
|
|
}
|
|
|
|
// GetIsEnabledOk returns a tuple with the IsEnabled field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AgentMcpTools) GetIsEnabledOk() (*bool, bool) {
|
|
if o == nil || IsNil(o.IsEnabled) {
|
|
return nil, false
|
|
}
|
|
return o.IsEnabled, true
|
|
}
|
|
|
|
// HasIsEnabled returns a boolean if a field has been set.
|
|
func (o *AgentMcpTools) HasIsEnabled() bool {
|
|
if o != nil && !IsNil(o.IsEnabled) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetIsEnabled gets a reference to the given bool and assigns it to the IsEnabled field.
|
|
func (o *AgentMcpTools) SetIsEnabled(v bool) {
|
|
o.IsEnabled = &v
|
|
}
|
|
|
|
// GetServerName returns the ServerName field value if set, zero value otherwise.
|
|
func (o *AgentMcpTools) GetServerName() string {
|
|
if o == nil || IsNil(o.ServerName) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.ServerName
|
|
}
|
|
|
|
// GetServerNameOk returns a tuple with the ServerName field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AgentMcpTools) GetServerNameOk() (*string, bool) {
|
|
if o == nil || IsNil(o.ServerName) {
|
|
return nil, false
|
|
}
|
|
return o.ServerName, true
|
|
}
|
|
|
|
// HasServerName returns a boolean if a field has been set.
|
|
func (o *AgentMcpTools) HasServerName() bool {
|
|
if o != nil && !IsNil(o.ServerName) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetServerName gets a reference to the given string and assigns it to the ServerName field.
|
|
func (o *AgentMcpTools) SetServerName(v string) {
|
|
o.ServerName = &v
|
|
}
|
|
|
|
// GetTools returns the Tools field value if set, zero value otherwise.
|
|
func (o *AgentMcpTools) GetTools() string {
|
|
if o == nil || IsNil(o.Tools) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Tools
|
|
}
|
|
|
|
// GetToolsOk returns a tuple with the Tools field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AgentMcpTools) GetToolsOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Tools) {
|
|
return nil, false
|
|
}
|
|
return o.Tools, true
|
|
}
|
|
|
|
// HasTools returns a boolean if a field has been set.
|
|
func (o *AgentMcpTools) HasTools() bool {
|
|
if o != nil && !IsNil(o.Tools) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetTools gets a reference to the given string and assigns it to the Tools field.
|
|
func (o *AgentMcpTools) SetTools(v string) {
|
|
o.Tools = &v
|
|
}
|
|
|
|
func (o AgentMcpTools) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o AgentMcpTools) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.IsEnabled) {
|
|
toSerialize["isEnabled"] = o.IsEnabled
|
|
}
|
|
if !IsNil(o.ServerName) {
|
|
toSerialize["serverName"] = o.ServerName
|
|
}
|
|
if !IsNil(o.Tools) {
|
|
toSerialize["tools"] = o.Tools
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *AgentMcpTools) UnmarshalJSON(data []byte) (err error) {
|
|
varAgentMcpTools := _AgentMcpTools{}
|
|
|
|
err = json.Unmarshal(data, &varAgentMcpTools)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = AgentMcpTools(varAgentMcpTools)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "isEnabled")
|
|
delete(additionalProperties, "serverName")
|
|
delete(additionalProperties, "tools")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableAgentMcpTools struct {
|
|
value *AgentMcpTools
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableAgentMcpTools) Get() *AgentMcpTools {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableAgentMcpTools) Set(val *AgentMcpTools) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableAgentMcpTools) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableAgentMcpTools) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableAgentMcpTools(val *AgentMcpTools) *NullableAgentMcpTools {
|
|
return &NullableAgentMcpTools{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableAgentMcpTools) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableAgentMcpTools) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|