mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
611 lines
16 KiB
Go
611 lines
16 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 ToolMCPServer type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &ToolMCPServer{}
|
|
|
|
// ToolMCPServer struct for ToolMCPServer
|
|
type ToolMCPServer struct {
|
|
// Admitted is whether an admin of the org, or a SuperAdmin, registered the server. Only an admitted server is carried into the org's agent runs: a server registered before registering one took an admin is not, until an admin registers it again.
|
|
Admitted *bool `json:"admitted,omitempty"`
|
|
// AuthHeader is the request header the KMS-held credential is injected into, e.g. \"Authorization\". Absent when the server needs no credential.
|
|
AuthHeader *string `json:"authHeader,omitempty"`
|
|
// CreatedAt is when the server was registered, Unix seconds.
|
|
CreatedAt *int64 `json:"createdAt,omitempty"`
|
|
// HasSecret is whether a credential is sealed in KMS for this server. The VALUE is never returned by any route.
|
|
HasSecret *bool `json:"hasSecret,omitempty"`
|
|
// ID is the server's id within the org. It also PREFIXES every tool name the server contributes, which is what keeps two servers' \"search\" apart.
|
|
Id *string `json:"id,omitempty"`
|
|
// Listing is the catalog entry this server was enabled from, when it was. Empty means the org typed the URL in itself.
|
|
Listing *string `json:"listing,omitempty"`
|
|
// Name is the org's label for the server.
|
|
Name *string `json:"name,omitempty"`
|
|
// Org is the org that registered the server — the validated caller's.
|
|
Org *string `json:"org,omitempty"`
|
|
// Reason says why a server that is not \"ok\" is not, in words any member may be shown: never the server's address.
|
|
Reason *string `json:"reason,omitempty"`
|
|
// Source is where the registration came from: \"catalog\" when it was enabled off the shelf, \"org\" when the org registered the URL itself. It is DERIVED from Listing rather than stored, because two columns for one fact is two chances to disagree.
|
|
Source *string `json:"source,omitempty"`
|
|
// Status is whether the server's tools could be listed when the org's servers were read: \"ok\", \"unreachable\", \"refused\" or \"error\". Only the listing answers it; a registration does not.
|
|
Status *string `json:"status,omitempty"`
|
|
// Tools is how many tools the server listed, when it listed them.
|
|
Tools *int64 `json:"tools,omitempty"`
|
|
// URL is the server's JSON-RPC endpoint. Always a public http(s) host: the registration boundary and the dialer both refuse anything else.
|
|
Url *string `json:"url,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _ToolMCPServer ToolMCPServer
|
|
|
|
// NewToolMCPServer instantiates a new ToolMCPServer 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 NewToolMCPServer() *ToolMCPServer {
|
|
this := ToolMCPServer{}
|
|
return &this
|
|
}
|
|
|
|
// NewToolMCPServerWithDefaults instantiates a new ToolMCPServer 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 NewToolMCPServerWithDefaults() *ToolMCPServer {
|
|
this := ToolMCPServer{}
|
|
return &this
|
|
}
|
|
|
|
// GetAdmitted returns the Admitted field value if set, zero value otherwise.
|
|
func (o *ToolMCPServer) GetAdmitted() bool {
|
|
if o == nil || IsNil(o.Admitted) {
|
|
var ret bool
|
|
return ret
|
|
}
|
|
return *o.Admitted
|
|
}
|
|
|
|
// GetAdmittedOk returns a tuple with the Admitted field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ToolMCPServer) GetAdmittedOk() (*bool, bool) {
|
|
if o == nil || IsNil(o.Admitted) {
|
|
return nil, false
|
|
}
|
|
return o.Admitted, true
|
|
}
|
|
|
|
// HasAdmitted returns a boolean if a field has been set.
|
|
func (o *ToolMCPServer) HasAdmitted() bool {
|
|
if o != nil && !IsNil(o.Admitted) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetAdmitted gets a reference to the given bool and assigns it to the Admitted field.
|
|
func (o *ToolMCPServer) SetAdmitted(v bool) {
|
|
o.Admitted = &v
|
|
}
|
|
|
|
// GetAuthHeader returns the AuthHeader field value if set, zero value otherwise.
|
|
func (o *ToolMCPServer) GetAuthHeader() string {
|
|
if o == nil || IsNil(o.AuthHeader) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.AuthHeader
|
|
}
|
|
|
|
// GetAuthHeaderOk returns a tuple with the AuthHeader field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ToolMCPServer) GetAuthHeaderOk() (*string, bool) {
|
|
if o == nil || IsNil(o.AuthHeader) {
|
|
return nil, false
|
|
}
|
|
return o.AuthHeader, true
|
|
}
|
|
|
|
// HasAuthHeader returns a boolean if a field has been set.
|
|
func (o *ToolMCPServer) HasAuthHeader() bool {
|
|
if o != nil && !IsNil(o.AuthHeader) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetAuthHeader gets a reference to the given string and assigns it to the AuthHeader field.
|
|
func (o *ToolMCPServer) SetAuthHeader(v string) {
|
|
o.AuthHeader = &v
|
|
}
|
|
|
|
// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise.
|
|
func (o *ToolMCPServer) GetCreatedAt() int64 {
|
|
if o == nil || IsNil(o.CreatedAt) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.CreatedAt
|
|
}
|
|
|
|
// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ToolMCPServer) GetCreatedAtOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.CreatedAt) {
|
|
return nil, false
|
|
}
|
|
return o.CreatedAt, true
|
|
}
|
|
|
|
// HasCreatedAt returns a boolean if a field has been set.
|
|
func (o *ToolMCPServer) HasCreatedAt() bool {
|
|
if o != nil && !IsNil(o.CreatedAt) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetCreatedAt gets a reference to the given int64 and assigns it to the CreatedAt field.
|
|
func (o *ToolMCPServer) SetCreatedAt(v int64) {
|
|
o.CreatedAt = &v
|
|
}
|
|
|
|
// GetHasSecret returns the HasSecret field value if set, zero value otherwise.
|
|
func (o *ToolMCPServer) GetHasSecret() bool {
|
|
if o == nil || IsNil(o.HasSecret) {
|
|
var ret bool
|
|
return ret
|
|
}
|
|
return *o.HasSecret
|
|
}
|
|
|
|
// GetHasSecretOk returns a tuple with the HasSecret field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ToolMCPServer) GetHasSecretOk() (*bool, bool) {
|
|
if o == nil || IsNil(o.HasSecret) {
|
|
return nil, false
|
|
}
|
|
return o.HasSecret, true
|
|
}
|
|
|
|
// HasHasSecret returns a boolean if a field has been set.
|
|
func (o *ToolMCPServer) HasHasSecret() bool {
|
|
if o != nil && !IsNil(o.HasSecret) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetHasSecret gets a reference to the given bool and assigns it to the HasSecret field.
|
|
func (o *ToolMCPServer) SetHasSecret(v bool) {
|
|
o.HasSecret = &v
|
|
}
|
|
|
|
// GetId returns the Id field value if set, zero value otherwise.
|
|
func (o *ToolMCPServer) GetId() string {
|
|
if o == nil || IsNil(o.Id) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Id
|
|
}
|
|
|
|
// GetIdOk returns a tuple with the Id field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ToolMCPServer) GetIdOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Id) {
|
|
return nil, false
|
|
}
|
|
return o.Id, true
|
|
}
|
|
|
|
// HasId returns a boolean if a field has been set.
|
|
func (o *ToolMCPServer) HasId() bool {
|
|
if o != nil && !IsNil(o.Id) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetId gets a reference to the given string and assigns it to the Id field.
|
|
func (o *ToolMCPServer) SetId(v string) {
|
|
o.Id = &v
|
|
}
|
|
|
|
// GetListing returns the Listing field value if set, zero value otherwise.
|
|
func (o *ToolMCPServer) GetListing() string {
|
|
if o == nil || IsNil(o.Listing) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Listing
|
|
}
|
|
|
|
// GetListingOk returns a tuple with the Listing field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ToolMCPServer) GetListingOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Listing) {
|
|
return nil, false
|
|
}
|
|
return o.Listing, true
|
|
}
|
|
|
|
// HasListing returns a boolean if a field has been set.
|
|
func (o *ToolMCPServer) HasListing() bool {
|
|
if o != nil && !IsNil(o.Listing) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetListing gets a reference to the given string and assigns it to the Listing field.
|
|
func (o *ToolMCPServer) SetListing(v string) {
|
|
o.Listing = &v
|
|
}
|
|
|
|
// GetName returns the Name field value if set, zero value otherwise.
|
|
func (o *ToolMCPServer) 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 *ToolMCPServer) 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 *ToolMCPServer) 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 *ToolMCPServer) SetName(v string) {
|
|
o.Name = &v
|
|
}
|
|
|
|
// GetOrg returns the Org field value if set, zero value otherwise.
|
|
func (o *ToolMCPServer) GetOrg() string {
|
|
if o == nil || IsNil(o.Org) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Org
|
|
}
|
|
|
|
// GetOrgOk returns a tuple with the Org field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ToolMCPServer) GetOrgOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Org) {
|
|
return nil, false
|
|
}
|
|
return o.Org, true
|
|
}
|
|
|
|
// HasOrg returns a boolean if a field has been set.
|
|
func (o *ToolMCPServer) HasOrg() bool {
|
|
if o != nil && !IsNil(o.Org) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetOrg gets a reference to the given string and assigns it to the Org field.
|
|
func (o *ToolMCPServer) SetOrg(v string) {
|
|
o.Org = &v
|
|
}
|
|
|
|
// GetReason returns the Reason field value if set, zero value otherwise.
|
|
func (o *ToolMCPServer) GetReason() string {
|
|
if o == nil || IsNil(o.Reason) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Reason
|
|
}
|
|
|
|
// GetReasonOk returns a tuple with the Reason field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ToolMCPServer) GetReasonOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Reason) {
|
|
return nil, false
|
|
}
|
|
return o.Reason, true
|
|
}
|
|
|
|
// HasReason returns a boolean if a field has been set.
|
|
func (o *ToolMCPServer) HasReason() bool {
|
|
if o != nil && !IsNil(o.Reason) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetReason gets a reference to the given string and assigns it to the Reason field.
|
|
func (o *ToolMCPServer) SetReason(v string) {
|
|
o.Reason = &v
|
|
}
|
|
|
|
// GetSource returns the Source field value if set, zero value otherwise.
|
|
func (o *ToolMCPServer) GetSource() string {
|
|
if o == nil || IsNil(o.Source) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Source
|
|
}
|
|
|
|
// GetSourceOk returns a tuple with the Source field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ToolMCPServer) GetSourceOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Source) {
|
|
return nil, false
|
|
}
|
|
return o.Source, true
|
|
}
|
|
|
|
// HasSource returns a boolean if a field has been set.
|
|
func (o *ToolMCPServer) HasSource() bool {
|
|
if o != nil && !IsNil(o.Source) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetSource gets a reference to the given string and assigns it to the Source field.
|
|
func (o *ToolMCPServer) SetSource(v string) {
|
|
o.Source = &v
|
|
}
|
|
|
|
// GetStatus returns the Status field value if set, zero value otherwise.
|
|
func (o *ToolMCPServer) GetStatus() string {
|
|
if o == nil || IsNil(o.Status) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Status
|
|
}
|
|
|
|
// GetStatusOk returns a tuple with the Status field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ToolMCPServer) GetStatusOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Status) {
|
|
return nil, false
|
|
}
|
|
return o.Status, true
|
|
}
|
|
|
|
// HasStatus returns a boolean if a field has been set.
|
|
func (o *ToolMCPServer) HasStatus() bool {
|
|
if o != nil && !IsNil(o.Status) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetStatus gets a reference to the given string and assigns it to the Status field.
|
|
func (o *ToolMCPServer) SetStatus(v string) {
|
|
o.Status = &v
|
|
}
|
|
|
|
// GetTools returns the Tools field value if set, zero value otherwise.
|
|
func (o *ToolMCPServer) 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 *ToolMCPServer) 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 *ToolMCPServer) 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 *ToolMCPServer) SetTools(v int64) {
|
|
o.Tools = &v
|
|
}
|
|
|
|
// GetUrl returns the Url field value if set, zero value otherwise.
|
|
func (o *ToolMCPServer) GetUrl() string {
|
|
if o == nil || IsNil(o.Url) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Url
|
|
}
|
|
|
|
// GetUrlOk returns a tuple with the Url field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ToolMCPServer) GetUrlOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Url) {
|
|
return nil, false
|
|
}
|
|
return o.Url, true
|
|
}
|
|
|
|
// HasUrl returns a boolean if a field has been set.
|
|
func (o *ToolMCPServer) HasUrl() bool {
|
|
if o != nil && !IsNil(o.Url) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetUrl gets a reference to the given string and assigns it to the Url field.
|
|
func (o *ToolMCPServer) SetUrl(v string) {
|
|
o.Url = &v
|
|
}
|
|
|
|
func (o ToolMCPServer) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o ToolMCPServer) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Admitted) {
|
|
toSerialize["admitted"] = o.Admitted
|
|
}
|
|
if !IsNil(o.AuthHeader) {
|
|
toSerialize["authHeader"] = o.AuthHeader
|
|
}
|
|
if !IsNil(o.CreatedAt) {
|
|
toSerialize["createdAt"] = o.CreatedAt
|
|
}
|
|
if !IsNil(o.HasSecret) {
|
|
toSerialize["hasSecret"] = o.HasSecret
|
|
}
|
|
if !IsNil(o.Id) {
|
|
toSerialize["id"] = o.Id
|
|
}
|
|
if !IsNil(o.Listing) {
|
|
toSerialize["listing"] = o.Listing
|
|
}
|
|
if !IsNil(o.Name) {
|
|
toSerialize["name"] = o.Name
|
|
}
|
|
if !IsNil(o.Org) {
|
|
toSerialize["org"] = o.Org
|
|
}
|
|
if !IsNil(o.Reason) {
|
|
toSerialize["reason"] = o.Reason
|
|
}
|
|
if !IsNil(o.Source) {
|
|
toSerialize["source"] = o.Source
|
|
}
|
|
if !IsNil(o.Status) {
|
|
toSerialize["status"] = o.Status
|
|
}
|
|
if !IsNil(o.Tools) {
|
|
toSerialize["tools"] = o.Tools
|
|
}
|
|
if !IsNil(o.Url) {
|
|
toSerialize["url"] = o.Url
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *ToolMCPServer) UnmarshalJSON(data []byte) (err error) {
|
|
varToolMCPServer := _ToolMCPServer{}
|
|
|
|
err = json.Unmarshal(data, &varToolMCPServer)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = ToolMCPServer(varToolMCPServer)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "admitted")
|
|
delete(additionalProperties, "authHeader")
|
|
delete(additionalProperties, "createdAt")
|
|
delete(additionalProperties, "hasSecret")
|
|
delete(additionalProperties, "id")
|
|
delete(additionalProperties, "listing")
|
|
delete(additionalProperties, "name")
|
|
delete(additionalProperties, "org")
|
|
delete(additionalProperties, "reason")
|
|
delete(additionalProperties, "source")
|
|
delete(additionalProperties, "status")
|
|
delete(additionalProperties, "tools")
|
|
delete(additionalProperties, "url")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableToolMCPServer struct {
|
|
value *ToolMCPServer
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableToolMCPServer) Get() *ToolMCPServer {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableToolMCPServer) Set(val *ToolMCPServer) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableToolMCPServer) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableToolMCPServer) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableToolMCPServer(val *ToolMCPServer) *NullableToolMCPServer {
|
|
return &NullableToolMCPServer{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableToolMCPServer) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableToolMCPServer) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|