Files
sdk/model_ai_mcp_surface.go

231 lines
6.0 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 AiMCPSurface type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &AiMCPSurface{}
// AiMCPSurface struct for AiMCPSurface
type AiMCPSurface struct {
// Apps is one row per subsystem this deployment composes, in manifest order.
Apps []AiMCPApp `json:"apps,omitempty"`
// Names are this process's own tool names, present only when the query asked for them.
Names []string `json:"names,omitempty"`
// Tools is how many tools THIS PROCESS's MCP server carries: its own typed-op registry, projected. It is the only number a subsystem can state honestly — what the FLEET's server carries is a question only the host can ask, and it asks it by asking every subsystem (POST /v1/mcp, tools/list).
Tools *int64 `json:"tools,omitempty"`
AdditionalProperties map[string]interface{}
}
type _AiMCPSurface AiMCPSurface
// NewAiMCPSurface instantiates a new AiMCPSurface 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 NewAiMCPSurface() *AiMCPSurface {
this := AiMCPSurface{}
return &this
}
// NewAiMCPSurfaceWithDefaults instantiates a new AiMCPSurface 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 NewAiMCPSurfaceWithDefaults() *AiMCPSurface {
this := AiMCPSurface{}
return &this
}
// GetApps returns the Apps field value if set, zero value otherwise.
func (o *AiMCPSurface) GetApps() []AiMCPApp {
if o == nil || IsNil(o.Apps) {
var ret []AiMCPApp
return ret
}
return o.Apps
}
// GetAppsOk returns a tuple with the Apps field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AiMCPSurface) GetAppsOk() ([]AiMCPApp, bool) {
if o == nil || IsNil(o.Apps) {
return nil, false
}
return o.Apps, true
}
// HasApps returns a boolean if a field has been set.
func (o *AiMCPSurface) HasApps() bool {
if o != nil && !IsNil(o.Apps) {
return true
}
return false
}
// SetApps gets a reference to the given []AiMCPApp and assigns it to the Apps field.
func (o *AiMCPSurface) SetApps(v []AiMCPApp) {
o.Apps = v
}
// GetNames returns the Names field value if set, zero value otherwise.
func (o *AiMCPSurface) GetNames() []string {
if o == nil || IsNil(o.Names) {
var ret []string
return ret
}
return o.Names
}
// GetNamesOk returns a tuple with the Names field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AiMCPSurface) GetNamesOk() ([]string, bool) {
if o == nil || IsNil(o.Names) {
return nil, false
}
return o.Names, true
}
// HasNames returns a boolean if a field has been set.
func (o *AiMCPSurface) HasNames() bool {
if o != nil && !IsNil(o.Names) {
return true
}
return false
}
// SetNames gets a reference to the given []string and assigns it to the Names field.
func (o *AiMCPSurface) SetNames(v []string) {
o.Names = v
}
// GetTools returns the Tools field value if set, zero value otherwise.
func (o *AiMCPSurface) GetTools() int64 {
if o == nil || IsNil(o.Tools) {
var ret int64
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 *AiMCPSurface) GetToolsOk() (*int64, 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 *AiMCPSurface) HasTools() bool {
if o != nil && !IsNil(o.Tools) {
return true
}
return false
}
// SetTools gets a reference to the given int64 and assigns it to the Tools field.
func (o *AiMCPSurface) SetTools(v int64) {
o.Tools = &v
}
func (o AiMCPSurface) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o AiMCPSurface) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Apps) {
toSerialize["apps"] = o.Apps
}
if !IsNil(o.Names) {
toSerialize["names"] = o.Names
}
if !IsNil(o.Tools) {
toSerialize["tools"] = o.Tools
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *AiMCPSurface) UnmarshalJSON(data []byte) (err error) {
varAiMCPSurface := _AiMCPSurface{}
err = json.Unmarshal(data, &varAiMCPSurface)
if err != nil {
return err
}
*o = AiMCPSurface(varAiMCPSurface)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "apps")
delete(additionalProperties, "names")
delete(additionalProperties, "tools")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableAiMCPSurface struct {
value *AiMCPSurface
isSet bool
}
func (v NullableAiMCPSurface) Get() *AiMCPSurface {
return v.value
}
func (v *NullableAiMCPSurface) Set(val *AiMCPSurface) {
v.value = val
v.isSet = true
}
func (v NullableAiMCPSurface) IsSet() bool {
return v.isSet
}
func (v *NullableAiMCPSurface) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableAiMCPSurface(val *AiMCPSurface) *NullableAiMCPSurface {
return &NullableAiMCPSurface{value: val, isSet: true}
}
func (v NullableAiMCPSurface) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableAiMCPSurface) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}