Files
sdk/model_tool_mcp_listing.go

763 lines
21 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 ToolMCPListing type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &ToolMCPListing{}
// ToolMCPListing struct for ToolMCPListing
type ToolMCPListing struct {
// Description is the publisher's one-line summary.
Description *string `json:"description,omitempty"`
// Featured puts the listing on the front of the shelf. Curation.
Featured *bool `json:"featured,omitempty"`
// Hidden keeps the listing out of the org-visible catalog. Curation: a sync never changes it. Only a SuperAdmin sets it, and only a SuperAdmin sees a hidden entry listed.
Hidden *bool `json:"hidden,omitempty"`
// ID addresses the listing in a URL. It is the reverse-DNS NAME with its one slash written as an underscore — reversible, because a namespace never contains an underscore — so the id is readable and stable rather than a hash that means nothing to whoever reads a link.
Id *string `json:"id,omitempty"`
// Logo is the brand mark to render for the listing — the publisher's icon when the entry carries one, or the one an admin set. Curation.
Logo *string `json:"logo,omitempty"`
// Name is the publisher's reverse-DNS name, e.g. \"com.stripe/mcp\".
Name *string `json:"name,omitempty"`
// Official is whether this is the vendor's OWN server rather than someone else's copy of it. Derived on every sync (see isOfficial) until a SuperAdmin sets it explicitly, after which the admin's answer stands.
Official *bool `json:"official,omitempty"`
// Packages are the runnable package forms — npm, pypi, oci — each with the runtime that launches it and the transport it then speaks.
Packages []ToolMCPPackage `json:"packages,omitempty"`
// Registry is the upstream this row was synced from.
Registry *string `json:"registry,omitempty"`
// Remotes are the hosted endpoints the publisher serves the server at.
Remotes []ToolMCPRemote `json:"remotes,omitempty"`
// Repo is the source repository URL, when the entry names one.
Repo *string `json:"repo,omitempty"`
// Site is the project's homepage, when the entry names one.
Site *string `json:"site,omitempty"`
// Synced is when this row was last confirmed against upstream, Unix seconds.
Synced *int64 `json:"synced,omitempty"`
// Title is the human-readable display name, when the entry carries one.
Title *string `json:"title,omitempty"`
// Transports are the distinct transports this server can be reached over, sorted: some of \"stdio\", \"streamable-http\", \"sse\". A listing with \"streamable-http\" is one an org can enable here and now; a listing that is only \"stdio\" needs a process to run it.
Transports []string `json:"transports,omitempty"`
// Vendor is the namespace half of Name — the publisher, e.g. \"com.stripe\".
Vendor *string `json:"vendor,omitempty"`
// Version is the published version of this listing.
Version *string `json:"version,omitempty"`
AdditionalProperties map[string]interface{}
}
type _ToolMCPListing ToolMCPListing
// NewToolMCPListing instantiates a new ToolMCPListing 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 NewToolMCPListing() *ToolMCPListing {
this := ToolMCPListing{}
return &this
}
// NewToolMCPListingWithDefaults instantiates a new ToolMCPListing 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 NewToolMCPListingWithDefaults() *ToolMCPListing {
this := ToolMCPListing{}
return &this
}
// GetDescription returns the Description field value if set, zero value otherwise.
func (o *ToolMCPListing) GetDescription() string {
if o == nil || IsNil(o.Description) {
var ret string
return ret
}
return *o.Description
}
// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ToolMCPListing) GetDescriptionOk() (*string, bool) {
if o == nil || IsNil(o.Description) {
return nil, false
}
return o.Description, true
}
// HasDescription returns a boolean if a field has been set.
func (o *ToolMCPListing) HasDescription() bool {
if o != nil && !IsNil(o.Description) {
return true
}
return false
}
// SetDescription gets a reference to the given string and assigns it to the Description field.
func (o *ToolMCPListing) SetDescription(v string) {
o.Description = &v
}
// GetFeatured returns the Featured field value if set, zero value otherwise.
func (o *ToolMCPListing) GetFeatured() bool {
if o == nil || IsNil(o.Featured) {
var ret bool
return ret
}
return *o.Featured
}
// GetFeaturedOk returns a tuple with the Featured field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ToolMCPListing) GetFeaturedOk() (*bool, bool) {
if o == nil || IsNil(o.Featured) {
return nil, false
}
return o.Featured, true
}
// HasFeatured returns a boolean if a field has been set.
func (o *ToolMCPListing) HasFeatured() bool {
if o != nil && !IsNil(o.Featured) {
return true
}
return false
}
// SetFeatured gets a reference to the given bool and assigns it to the Featured field.
func (o *ToolMCPListing) SetFeatured(v bool) {
o.Featured = &v
}
// GetHidden returns the Hidden field value if set, zero value otherwise.
func (o *ToolMCPListing) GetHidden() bool {
if o == nil || IsNil(o.Hidden) {
var ret bool
return ret
}
return *o.Hidden
}
// GetHiddenOk returns a tuple with the Hidden field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ToolMCPListing) GetHiddenOk() (*bool, bool) {
if o == nil || IsNil(o.Hidden) {
return nil, false
}
return o.Hidden, true
}
// HasHidden returns a boolean if a field has been set.
func (o *ToolMCPListing) HasHidden() bool {
if o != nil && !IsNil(o.Hidden) {
return true
}
return false
}
// SetHidden gets a reference to the given bool and assigns it to the Hidden field.
func (o *ToolMCPListing) SetHidden(v bool) {
o.Hidden = &v
}
// GetId returns the Id field value if set, zero value otherwise.
func (o *ToolMCPListing) 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 *ToolMCPListing) 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 *ToolMCPListing) 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 *ToolMCPListing) SetId(v string) {
o.Id = &v
}
// GetLogo returns the Logo field value if set, zero value otherwise.
func (o *ToolMCPListing) GetLogo() string {
if o == nil || IsNil(o.Logo) {
var ret string
return ret
}
return *o.Logo
}
// GetLogoOk returns a tuple with the Logo field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ToolMCPListing) GetLogoOk() (*string, bool) {
if o == nil || IsNil(o.Logo) {
return nil, false
}
return o.Logo, true
}
// HasLogo returns a boolean if a field has been set.
func (o *ToolMCPListing) HasLogo() bool {
if o != nil && !IsNil(o.Logo) {
return true
}
return false
}
// SetLogo gets a reference to the given string and assigns it to the Logo field.
func (o *ToolMCPListing) SetLogo(v string) {
o.Logo = &v
}
// GetName returns the Name field value if set, zero value otherwise.
func (o *ToolMCPListing) 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 *ToolMCPListing) 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 *ToolMCPListing) 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 *ToolMCPListing) SetName(v string) {
o.Name = &v
}
// GetOfficial returns the Official field value if set, zero value otherwise.
func (o *ToolMCPListing) GetOfficial() bool {
if o == nil || IsNil(o.Official) {
var ret bool
return ret
}
return *o.Official
}
// GetOfficialOk returns a tuple with the Official field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ToolMCPListing) GetOfficialOk() (*bool, bool) {
if o == nil || IsNil(o.Official) {
return nil, false
}
return o.Official, true
}
// HasOfficial returns a boolean if a field has been set.
func (o *ToolMCPListing) HasOfficial() bool {
if o != nil && !IsNil(o.Official) {
return true
}
return false
}
// SetOfficial gets a reference to the given bool and assigns it to the Official field.
func (o *ToolMCPListing) SetOfficial(v bool) {
o.Official = &v
}
// GetPackages returns the Packages field value if set, zero value otherwise.
func (o *ToolMCPListing) GetPackages() []ToolMCPPackage {
if o == nil || IsNil(o.Packages) {
var ret []ToolMCPPackage
return ret
}
return o.Packages
}
// GetPackagesOk returns a tuple with the Packages field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ToolMCPListing) GetPackagesOk() ([]ToolMCPPackage, bool) {
if o == nil || IsNil(o.Packages) {
return nil, false
}
return o.Packages, true
}
// HasPackages returns a boolean if a field has been set.
func (o *ToolMCPListing) HasPackages() bool {
if o != nil && !IsNil(o.Packages) {
return true
}
return false
}
// SetPackages gets a reference to the given []ToolMCPPackage and assigns it to the Packages field.
func (o *ToolMCPListing) SetPackages(v []ToolMCPPackage) {
o.Packages = v
}
// GetRegistry returns the Registry field value if set, zero value otherwise.
func (o *ToolMCPListing) GetRegistry() string {
if o == nil || IsNil(o.Registry) {
var ret string
return ret
}
return *o.Registry
}
// GetRegistryOk returns a tuple with the Registry field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ToolMCPListing) GetRegistryOk() (*string, bool) {
if o == nil || IsNil(o.Registry) {
return nil, false
}
return o.Registry, true
}
// HasRegistry returns a boolean if a field has been set.
func (o *ToolMCPListing) HasRegistry() bool {
if o != nil && !IsNil(o.Registry) {
return true
}
return false
}
// SetRegistry gets a reference to the given string and assigns it to the Registry field.
func (o *ToolMCPListing) SetRegistry(v string) {
o.Registry = &v
}
// GetRemotes returns the Remotes field value if set, zero value otherwise.
func (o *ToolMCPListing) GetRemotes() []ToolMCPRemote {
if o == nil || IsNil(o.Remotes) {
var ret []ToolMCPRemote
return ret
}
return o.Remotes
}
// GetRemotesOk returns a tuple with the Remotes field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ToolMCPListing) GetRemotesOk() ([]ToolMCPRemote, bool) {
if o == nil || IsNil(o.Remotes) {
return nil, false
}
return o.Remotes, true
}
// HasRemotes returns a boolean if a field has been set.
func (o *ToolMCPListing) HasRemotes() bool {
if o != nil && !IsNil(o.Remotes) {
return true
}
return false
}
// SetRemotes gets a reference to the given []ToolMCPRemote and assigns it to the Remotes field.
func (o *ToolMCPListing) SetRemotes(v []ToolMCPRemote) {
o.Remotes = v
}
// GetRepo returns the Repo field value if set, zero value otherwise.
func (o *ToolMCPListing) GetRepo() string {
if o == nil || IsNil(o.Repo) {
var ret string
return ret
}
return *o.Repo
}
// GetRepoOk returns a tuple with the Repo field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ToolMCPListing) GetRepoOk() (*string, bool) {
if o == nil || IsNil(o.Repo) {
return nil, false
}
return o.Repo, true
}
// HasRepo returns a boolean if a field has been set.
func (o *ToolMCPListing) HasRepo() bool {
if o != nil && !IsNil(o.Repo) {
return true
}
return false
}
// SetRepo gets a reference to the given string and assigns it to the Repo field.
func (o *ToolMCPListing) SetRepo(v string) {
o.Repo = &v
}
// GetSite returns the Site field value if set, zero value otherwise.
func (o *ToolMCPListing) GetSite() string {
if o == nil || IsNil(o.Site) {
var ret string
return ret
}
return *o.Site
}
// GetSiteOk returns a tuple with the Site field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ToolMCPListing) GetSiteOk() (*string, bool) {
if o == nil || IsNil(o.Site) {
return nil, false
}
return o.Site, true
}
// HasSite returns a boolean if a field has been set.
func (o *ToolMCPListing) HasSite() bool {
if o != nil && !IsNil(o.Site) {
return true
}
return false
}
// SetSite gets a reference to the given string and assigns it to the Site field.
func (o *ToolMCPListing) SetSite(v string) {
o.Site = &v
}
// GetSynced returns the Synced field value if set, zero value otherwise.
func (o *ToolMCPListing) GetSynced() int64 {
if o == nil || IsNil(o.Synced) {
var ret int64
return ret
}
return *o.Synced
}
// GetSyncedOk returns a tuple with the Synced field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ToolMCPListing) GetSyncedOk() (*int64, bool) {
if o == nil || IsNil(o.Synced) {
return nil, false
}
return o.Synced, true
}
// HasSynced returns a boolean if a field has been set.
func (o *ToolMCPListing) HasSynced() bool {
if o != nil && !IsNil(o.Synced) {
return true
}
return false
}
// SetSynced gets a reference to the given int64 and assigns it to the Synced field.
func (o *ToolMCPListing) SetSynced(v int64) {
o.Synced = &v
}
// GetTitle returns the Title field value if set, zero value otherwise.
func (o *ToolMCPListing) GetTitle() string {
if o == nil || IsNil(o.Title) {
var ret string
return ret
}
return *o.Title
}
// GetTitleOk returns a tuple with the Title field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ToolMCPListing) GetTitleOk() (*string, bool) {
if o == nil || IsNil(o.Title) {
return nil, false
}
return o.Title, true
}
// HasTitle returns a boolean if a field has been set.
func (o *ToolMCPListing) HasTitle() bool {
if o != nil && !IsNil(o.Title) {
return true
}
return false
}
// SetTitle gets a reference to the given string and assigns it to the Title field.
func (o *ToolMCPListing) SetTitle(v string) {
o.Title = &v
}
// GetTransports returns the Transports field value if set, zero value otherwise.
func (o *ToolMCPListing) GetTransports() []string {
if o == nil || IsNil(o.Transports) {
var ret []string
return ret
}
return o.Transports
}
// GetTransportsOk returns a tuple with the Transports field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ToolMCPListing) GetTransportsOk() ([]string, bool) {
if o == nil || IsNil(o.Transports) {
return nil, false
}
return o.Transports, true
}
// HasTransports returns a boolean if a field has been set.
func (o *ToolMCPListing) HasTransports() bool {
if o != nil && !IsNil(o.Transports) {
return true
}
return false
}
// SetTransports gets a reference to the given []string and assigns it to the Transports field.
func (o *ToolMCPListing) SetTransports(v []string) {
o.Transports = v
}
// GetVendor returns the Vendor field value if set, zero value otherwise.
func (o *ToolMCPListing) GetVendor() string {
if o == nil || IsNil(o.Vendor) {
var ret string
return ret
}
return *o.Vendor
}
// GetVendorOk returns a tuple with the Vendor field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ToolMCPListing) GetVendorOk() (*string, bool) {
if o == nil || IsNil(o.Vendor) {
return nil, false
}
return o.Vendor, true
}
// HasVendor returns a boolean if a field has been set.
func (o *ToolMCPListing) HasVendor() bool {
if o != nil && !IsNil(o.Vendor) {
return true
}
return false
}
// SetVendor gets a reference to the given string and assigns it to the Vendor field.
func (o *ToolMCPListing) SetVendor(v string) {
o.Vendor = &v
}
// GetVersion returns the Version field value if set, zero value otherwise.
func (o *ToolMCPListing) GetVersion() string {
if o == nil || IsNil(o.Version) {
var ret string
return ret
}
return *o.Version
}
// GetVersionOk returns a tuple with the Version field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ToolMCPListing) GetVersionOk() (*string, bool) {
if o == nil || IsNil(o.Version) {
return nil, false
}
return o.Version, true
}
// HasVersion returns a boolean if a field has been set.
func (o *ToolMCPListing) HasVersion() bool {
if o != nil && !IsNil(o.Version) {
return true
}
return false
}
// SetVersion gets a reference to the given string and assigns it to the Version field.
func (o *ToolMCPListing) SetVersion(v string) {
o.Version = &v
}
func (o ToolMCPListing) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o ToolMCPListing) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Description) {
toSerialize["description"] = o.Description
}
if !IsNil(o.Featured) {
toSerialize["featured"] = o.Featured
}
if !IsNil(o.Hidden) {
toSerialize["hidden"] = o.Hidden
}
if !IsNil(o.Id) {
toSerialize["id"] = o.Id
}
if !IsNil(o.Logo) {
toSerialize["logo"] = o.Logo
}
if !IsNil(o.Name) {
toSerialize["name"] = o.Name
}
if !IsNil(o.Official) {
toSerialize["official"] = o.Official
}
if !IsNil(o.Packages) {
toSerialize["packages"] = o.Packages
}
if !IsNil(o.Registry) {
toSerialize["registry"] = o.Registry
}
if !IsNil(o.Remotes) {
toSerialize["remotes"] = o.Remotes
}
if !IsNil(o.Repo) {
toSerialize["repo"] = o.Repo
}
if !IsNil(o.Site) {
toSerialize["site"] = o.Site
}
if !IsNil(o.Synced) {
toSerialize["synced"] = o.Synced
}
if !IsNil(o.Title) {
toSerialize["title"] = o.Title
}
if !IsNil(o.Transports) {
toSerialize["transports"] = o.Transports
}
if !IsNil(o.Vendor) {
toSerialize["vendor"] = o.Vendor
}
if !IsNil(o.Version) {
toSerialize["version"] = o.Version
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *ToolMCPListing) UnmarshalJSON(data []byte) (err error) {
varToolMCPListing := _ToolMCPListing{}
err = json.Unmarshal(data, &varToolMCPListing)
if err != nil {
return err
}
*o = ToolMCPListing(varToolMCPListing)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "description")
delete(additionalProperties, "featured")
delete(additionalProperties, "hidden")
delete(additionalProperties, "id")
delete(additionalProperties, "logo")
delete(additionalProperties, "name")
delete(additionalProperties, "official")
delete(additionalProperties, "packages")
delete(additionalProperties, "registry")
delete(additionalProperties, "remotes")
delete(additionalProperties, "repo")
delete(additionalProperties, "site")
delete(additionalProperties, "synced")
delete(additionalProperties, "title")
delete(additionalProperties, "transports")
delete(additionalProperties, "vendor")
delete(additionalProperties, "version")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableToolMCPListing struct {
value *ToolMCPListing
isSet bool
}
func (v NullableToolMCPListing) Get() *ToolMCPListing {
return v.value
}
func (v *NullableToolMCPListing) Set(val *ToolMCPListing) {
v.value = val
v.isSet = true
}
func (v NullableToolMCPListing) IsSet() bool {
return v.isSet
}
func (v *NullableToolMCPListing) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableToolMCPListing(val *ToolMCPListing) *NullableToolMCPListing {
return &NullableToolMCPListing{value: val, isSet: true}
}
func (v NullableToolMCPListing) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableToolMCPListing) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}