mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
269 lines
7.0 KiB
Go
269 lines
7.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 ToolMcpCatalog type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &ToolMcpCatalog{}
|
|
|
|
// ToolMcpCatalog struct for ToolMcpCatalog
|
|
type ToolMcpCatalog struct {
|
|
// Catalog is this page of listings, featured first, then by name.
|
|
Catalog []ToolMCPListing `json:"catalog,omitempty"`
|
|
// Limit is the page size that was actually applied — the default or the clamp, when the request asked for neither or for too much.
|
|
Limit *int64 `json:"limit,omitempty"`
|
|
// Offset is where this page started, so a caller pages from what the server did rather than from what it asked for.
|
|
Offset *int64 `json:"offset,omitempty"`
|
|
// Total is how many listings the filter matched, which is more than this page holds whenever there is a next one.
|
|
Total *int64 `json:"total,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _ToolMcpCatalog ToolMcpCatalog
|
|
|
|
// NewToolMcpCatalog instantiates a new ToolMcpCatalog 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 NewToolMcpCatalog() *ToolMcpCatalog {
|
|
this := ToolMcpCatalog{}
|
|
return &this
|
|
}
|
|
|
|
// NewToolMcpCatalogWithDefaults instantiates a new ToolMcpCatalog 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 NewToolMcpCatalogWithDefaults() *ToolMcpCatalog {
|
|
this := ToolMcpCatalog{}
|
|
return &this
|
|
}
|
|
|
|
// GetCatalog returns the Catalog field value if set, zero value otherwise.
|
|
func (o *ToolMcpCatalog) GetCatalog() []ToolMCPListing {
|
|
if o == nil || IsNil(o.Catalog) {
|
|
var ret []ToolMCPListing
|
|
return ret
|
|
}
|
|
return o.Catalog
|
|
}
|
|
|
|
// GetCatalogOk returns a tuple with the Catalog field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ToolMcpCatalog) GetCatalogOk() ([]ToolMCPListing, bool) {
|
|
if o == nil || IsNil(o.Catalog) {
|
|
return nil, false
|
|
}
|
|
return o.Catalog, true
|
|
}
|
|
|
|
// HasCatalog returns a boolean if a field has been set.
|
|
func (o *ToolMcpCatalog) HasCatalog() bool {
|
|
if o != nil && !IsNil(o.Catalog) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetCatalog gets a reference to the given []ToolMCPListing and assigns it to the Catalog field.
|
|
func (o *ToolMcpCatalog) SetCatalog(v []ToolMCPListing) {
|
|
o.Catalog = v
|
|
}
|
|
|
|
// GetLimit returns the Limit field value if set, zero value otherwise.
|
|
func (o *ToolMcpCatalog) GetLimit() int64 {
|
|
if o == nil || IsNil(o.Limit) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.Limit
|
|
}
|
|
|
|
// GetLimitOk returns a tuple with the Limit field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ToolMcpCatalog) GetLimitOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.Limit) {
|
|
return nil, false
|
|
}
|
|
return o.Limit, true
|
|
}
|
|
|
|
// HasLimit returns a boolean if a field has been set.
|
|
func (o *ToolMcpCatalog) HasLimit() bool {
|
|
if o != nil && !IsNil(o.Limit) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetLimit gets a reference to the given int64 and assigns it to the Limit field.
|
|
func (o *ToolMcpCatalog) SetLimit(v int64) {
|
|
o.Limit = &v
|
|
}
|
|
|
|
// GetOffset returns the Offset field value if set, zero value otherwise.
|
|
func (o *ToolMcpCatalog) GetOffset() int64 {
|
|
if o == nil || IsNil(o.Offset) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.Offset
|
|
}
|
|
|
|
// GetOffsetOk returns a tuple with the Offset field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ToolMcpCatalog) GetOffsetOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.Offset) {
|
|
return nil, false
|
|
}
|
|
return o.Offset, true
|
|
}
|
|
|
|
// HasOffset returns a boolean if a field has been set.
|
|
func (o *ToolMcpCatalog) HasOffset() bool {
|
|
if o != nil && !IsNil(o.Offset) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetOffset gets a reference to the given int64 and assigns it to the Offset field.
|
|
func (o *ToolMcpCatalog) SetOffset(v int64) {
|
|
o.Offset = &v
|
|
}
|
|
|
|
// GetTotal returns the Total field value if set, zero value otherwise.
|
|
func (o *ToolMcpCatalog) GetTotal() int64 {
|
|
if o == nil || IsNil(o.Total) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.Total
|
|
}
|
|
|
|
// GetTotalOk returns a tuple with the Total field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ToolMcpCatalog) GetTotalOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.Total) {
|
|
return nil, false
|
|
}
|
|
return o.Total, true
|
|
}
|
|
|
|
// HasTotal returns a boolean if a field has been set.
|
|
func (o *ToolMcpCatalog) HasTotal() bool {
|
|
if o != nil && !IsNil(o.Total) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetTotal gets a reference to the given int64 and assigns it to the Total field.
|
|
func (o *ToolMcpCatalog) SetTotal(v int64) {
|
|
o.Total = &v
|
|
}
|
|
|
|
func (o ToolMcpCatalog) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o ToolMcpCatalog) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Catalog) {
|
|
toSerialize["catalog"] = o.Catalog
|
|
}
|
|
if !IsNil(o.Limit) {
|
|
toSerialize["limit"] = o.Limit
|
|
}
|
|
if !IsNil(o.Offset) {
|
|
toSerialize["offset"] = o.Offset
|
|
}
|
|
if !IsNil(o.Total) {
|
|
toSerialize["total"] = o.Total
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *ToolMcpCatalog) UnmarshalJSON(data []byte) (err error) {
|
|
varToolMcpCatalog := _ToolMcpCatalog{}
|
|
|
|
err = json.Unmarshal(data, &varToolMcpCatalog)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = ToolMcpCatalog(varToolMcpCatalog)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "catalog")
|
|
delete(additionalProperties, "limit")
|
|
delete(additionalProperties, "offset")
|
|
delete(additionalProperties, "total")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableToolMcpCatalog struct {
|
|
value *ToolMcpCatalog
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableToolMcpCatalog) Get() *ToolMcpCatalog {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableToolMcpCatalog) Set(val *ToolMcpCatalog) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableToolMcpCatalog) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableToolMcpCatalog) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableToolMcpCatalog(val *ToolMcpCatalog) *NullableToolMcpCatalog {
|
|
return &NullableToolMcpCatalog{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableToolMcpCatalog) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableToolMcpCatalog) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|