Files
sdk/model_tool_kit.go

307 lines
7.7 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 ToolKit type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &ToolKit{}
// ToolKit struct for ToolKit
type ToolKit struct {
// Excess are servers left out, by id, because a run carries only so many.
Excess []string `json:"excess,omitempty"`
// Muted are the names the run's person took out of their own runs — a skill, a server's tool, or a server by its id. None of them is above.
Muted []string `json:"muted,omitempty"`
// Omitted are activated skills left out because a run carries only so many.
Omitted []string `json:"omitted,omitempty"`
// Servers are the MCP servers an admin registered and activated tools of, at most KitServers of them.
Servers []ToolRemote `json:"servers,omitempty"`
// Skills are the documents of the skills an admin activated, by name.
Skills []ToolSkillDoc `json:"skills,omitempty"`
AdditionalProperties map[string]interface{}
}
type _ToolKit ToolKit
// NewToolKit instantiates a new ToolKit 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 NewToolKit() *ToolKit {
this := ToolKit{}
return &this
}
// NewToolKitWithDefaults instantiates a new ToolKit 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 NewToolKitWithDefaults() *ToolKit {
this := ToolKit{}
return &this
}
// GetExcess returns the Excess field value if set, zero value otherwise.
func (o *ToolKit) GetExcess() []string {
if o == nil || IsNil(o.Excess) {
var ret []string
return ret
}
return o.Excess
}
// GetExcessOk returns a tuple with the Excess field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ToolKit) GetExcessOk() ([]string, bool) {
if o == nil || IsNil(o.Excess) {
return nil, false
}
return o.Excess, true
}
// HasExcess returns a boolean if a field has been set.
func (o *ToolKit) HasExcess() bool {
if o != nil && !IsNil(o.Excess) {
return true
}
return false
}
// SetExcess gets a reference to the given []string and assigns it to the Excess field.
func (o *ToolKit) SetExcess(v []string) {
o.Excess = v
}
// GetMuted returns the Muted field value if set, zero value otherwise.
func (o *ToolKit) GetMuted() []string {
if o == nil || IsNil(o.Muted) {
var ret []string
return ret
}
return o.Muted
}
// GetMutedOk returns a tuple with the Muted field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ToolKit) GetMutedOk() ([]string, bool) {
if o == nil || IsNil(o.Muted) {
return nil, false
}
return o.Muted, true
}
// HasMuted returns a boolean if a field has been set.
func (o *ToolKit) HasMuted() bool {
if o != nil && !IsNil(o.Muted) {
return true
}
return false
}
// SetMuted gets a reference to the given []string and assigns it to the Muted field.
func (o *ToolKit) SetMuted(v []string) {
o.Muted = v
}
// GetOmitted returns the Omitted field value if set, zero value otherwise.
func (o *ToolKit) GetOmitted() []string {
if o == nil || IsNil(o.Omitted) {
var ret []string
return ret
}
return o.Omitted
}
// GetOmittedOk returns a tuple with the Omitted field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ToolKit) GetOmittedOk() ([]string, bool) {
if o == nil || IsNil(o.Omitted) {
return nil, false
}
return o.Omitted, true
}
// HasOmitted returns a boolean if a field has been set.
func (o *ToolKit) HasOmitted() bool {
if o != nil && !IsNil(o.Omitted) {
return true
}
return false
}
// SetOmitted gets a reference to the given []string and assigns it to the Omitted field.
func (o *ToolKit) SetOmitted(v []string) {
o.Omitted = v
}
// GetServers returns the Servers field value if set, zero value otherwise.
func (o *ToolKit) GetServers() []ToolRemote {
if o == nil || IsNil(o.Servers) {
var ret []ToolRemote
return ret
}
return o.Servers
}
// GetServersOk returns a tuple with the Servers field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ToolKit) GetServersOk() ([]ToolRemote, bool) {
if o == nil || IsNil(o.Servers) {
return nil, false
}
return o.Servers, true
}
// HasServers returns a boolean if a field has been set.
func (o *ToolKit) HasServers() bool {
if o != nil && !IsNil(o.Servers) {
return true
}
return false
}
// SetServers gets a reference to the given []ToolRemote and assigns it to the Servers field.
func (o *ToolKit) SetServers(v []ToolRemote) {
o.Servers = v
}
// GetSkills returns the Skills field value if set, zero value otherwise.
func (o *ToolKit) GetSkills() []ToolSkillDoc {
if o == nil || IsNil(o.Skills) {
var ret []ToolSkillDoc
return ret
}
return o.Skills
}
// GetSkillsOk returns a tuple with the Skills field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ToolKit) GetSkillsOk() ([]ToolSkillDoc, bool) {
if o == nil || IsNil(o.Skills) {
return nil, false
}
return o.Skills, true
}
// HasSkills returns a boolean if a field has been set.
func (o *ToolKit) HasSkills() bool {
if o != nil && !IsNil(o.Skills) {
return true
}
return false
}
// SetSkills gets a reference to the given []ToolSkillDoc and assigns it to the Skills field.
func (o *ToolKit) SetSkills(v []ToolSkillDoc) {
o.Skills = v
}
func (o ToolKit) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o ToolKit) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Excess) {
toSerialize["excess"] = o.Excess
}
if !IsNil(o.Muted) {
toSerialize["muted"] = o.Muted
}
if !IsNil(o.Omitted) {
toSerialize["omitted"] = o.Omitted
}
if !IsNil(o.Servers) {
toSerialize["servers"] = o.Servers
}
if !IsNil(o.Skills) {
toSerialize["skills"] = o.Skills
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *ToolKit) UnmarshalJSON(data []byte) (err error) {
varToolKit := _ToolKit{}
err = json.Unmarshal(data, &varToolKit)
if err != nil {
return err
}
*o = ToolKit(varToolKit)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "excess")
delete(additionalProperties, "muted")
delete(additionalProperties, "omitted")
delete(additionalProperties, "servers")
delete(additionalProperties, "skills")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableToolKit struct {
value *ToolKit
isSet bool
}
func (v NullableToolKit) Get() *ToolKit {
return v.value
}
func (v *NullableToolKit) Set(val *ToolKit) {
v.value = val
v.isSet = true
}
func (v NullableToolKit) IsSet() bool {
return v.isSet
}
func (v *NullableToolKit) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableToolKit(val *ToolKit) *NullableToolKit {
return &NullableToolKit{value: val, isSet: true}
}
func (v NullableToolKit) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableToolKit) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}