mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
269 lines
7.5 KiB
Go
269 lines
7.5 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 WorldLimitsBlock type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &WorldLimitsBlock{}
|
|
|
|
// WorldLimitsBlock struct for WorldLimitsBlock
|
|
type WorldLimitsBlock struct {
|
|
// APIRateLimit is requests per minute allowed against the REST /v1/world surface. -1 means unlimited.
|
|
ApiRateLimit *int64 `json:"apiRateLimit,omitempty"`
|
|
// MaxAlerts is how many saved OSINT alert rules the plan allows. -1 means unlimited.
|
|
MaxAlerts *int64 `json:"maxAlerts,omitempty"`
|
|
// MCPRateLimit is requests per minute allowed against the MCP surface. -1 means unlimited.
|
|
McpRateLimit *int64 `json:"mcpRateLimit,omitempty"`
|
|
// ModelAPI is whether the plan reaches the World model endpoint and the SSE stream. The free floor is false, and that is what a catalog outage resolves to.
|
|
ModelApi *bool `json:"modelApi,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _WorldLimitsBlock WorldLimitsBlock
|
|
|
|
// NewWorldLimitsBlock instantiates a new WorldLimitsBlock 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 NewWorldLimitsBlock() *WorldLimitsBlock {
|
|
this := WorldLimitsBlock{}
|
|
return &this
|
|
}
|
|
|
|
// NewWorldLimitsBlockWithDefaults instantiates a new WorldLimitsBlock 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 NewWorldLimitsBlockWithDefaults() *WorldLimitsBlock {
|
|
this := WorldLimitsBlock{}
|
|
return &this
|
|
}
|
|
|
|
// GetApiRateLimit returns the ApiRateLimit field value if set, zero value otherwise.
|
|
func (o *WorldLimitsBlock) GetApiRateLimit() int64 {
|
|
if o == nil || IsNil(o.ApiRateLimit) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.ApiRateLimit
|
|
}
|
|
|
|
// GetApiRateLimitOk returns a tuple with the ApiRateLimit field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *WorldLimitsBlock) GetApiRateLimitOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.ApiRateLimit) {
|
|
return nil, false
|
|
}
|
|
return o.ApiRateLimit, true
|
|
}
|
|
|
|
// HasApiRateLimit returns a boolean if a field has been set.
|
|
func (o *WorldLimitsBlock) HasApiRateLimit() bool {
|
|
if o != nil && !IsNil(o.ApiRateLimit) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetApiRateLimit gets a reference to the given int64 and assigns it to the ApiRateLimit field.
|
|
func (o *WorldLimitsBlock) SetApiRateLimit(v int64) {
|
|
o.ApiRateLimit = &v
|
|
}
|
|
|
|
// GetMaxAlerts returns the MaxAlerts field value if set, zero value otherwise.
|
|
func (o *WorldLimitsBlock) GetMaxAlerts() int64 {
|
|
if o == nil || IsNil(o.MaxAlerts) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.MaxAlerts
|
|
}
|
|
|
|
// GetMaxAlertsOk returns a tuple with the MaxAlerts field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *WorldLimitsBlock) GetMaxAlertsOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.MaxAlerts) {
|
|
return nil, false
|
|
}
|
|
return o.MaxAlerts, true
|
|
}
|
|
|
|
// HasMaxAlerts returns a boolean if a field has been set.
|
|
func (o *WorldLimitsBlock) HasMaxAlerts() bool {
|
|
if o != nil && !IsNil(o.MaxAlerts) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetMaxAlerts gets a reference to the given int64 and assigns it to the MaxAlerts field.
|
|
func (o *WorldLimitsBlock) SetMaxAlerts(v int64) {
|
|
o.MaxAlerts = &v
|
|
}
|
|
|
|
// GetMcpRateLimit returns the McpRateLimit field value if set, zero value otherwise.
|
|
func (o *WorldLimitsBlock) GetMcpRateLimit() int64 {
|
|
if o == nil || IsNil(o.McpRateLimit) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.McpRateLimit
|
|
}
|
|
|
|
// GetMcpRateLimitOk returns a tuple with the McpRateLimit field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *WorldLimitsBlock) GetMcpRateLimitOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.McpRateLimit) {
|
|
return nil, false
|
|
}
|
|
return o.McpRateLimit, true
|
|
}
|
|
|
|
// HasMcpRateLimit returns a boolean if a field has been set.
|
|
func (o *WorldLimitsBlock) HasMcpRateLimit() bool {
|
|
if o != nil && !IsNil(o.McpRateLimit) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetMcpRateLimit gets a reference to the given int64 and assigns it to the McpRateLimit field.
|
|
func (o *WorldLimitsBlock) SetMcpRateLimit(v int64) {
|
|
o.McpRateLimit = &v
|
|
}
|
|
|
|
// GetModelApi returns the ModelApi field value if set, zero value otherwise.
|
|
func (o *WorldLimitsBlock) GetModelApi() bool {
|
|
if o == nil || IsNil(o.ModelApi) {
|
|
var ret bool
|
|
return ret
|
|
}
|
|
return *o.ModelApi
|
|
}
|
|
|
|
// GetModelApiOk returns a tuple with the ModelApi field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *WorldLimitsBlock) GetModelApiOk() (*bool, bool) {
|
|
if o == nil || IsNil(o.ModelApi) {
|
|
return nil, false
|
|
}
|
|
return o.ModelApi, true
|
|
}
|
|
|
|
// HasModelApi returns a boolean if a field has been set.
|
|
func (o *WorldLimitsBlock) HasModelApi() bool {
|
|
if o != nil && !IsNil(o.ModelApi) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetModelApi gets a reference to the given bool and assigns it to the ModelApi field.
|
|
func (o *WorldLimitsBlock) SetModelApi(v bool) {
|
|
o.ModelApi = &v
|
|
}
|
|
|
|
func (o WorldLimitsBlock) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o WorldLimitsBlock) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.ApiRateLimit) {
|
|
toSerialize["apiRateLimit"] = o.ApiRateLimit
|
|
}
|
|
if !IsNil(o.MaxAlerts) {
|
|
toSerialize["maxAlerts"] = o.MaxAlerts
|
|
}
|
|
if !IsNil(o.McpRateLimit) {
|
|
toSerialize["mcpRateLimit"] = o.McpRateLimit
|
|
}
|
|
if !IsNil(o.ModelApi) {
|
|
toSerialize["modelApi"] = o.ModelApi
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *WorldLimitsBlock) UnmarshalJSON(data []byte) (err error) {
|
|
varWorldLimitsBlock := _WorldLimitsBlock{}
|
|
|
|
err = json.Unmarshal(data, &varWorldLimitsBlock)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = WorldLimitsBlock(varWorldLimitsBlock)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "apiRateLimit")
|
|
delete(additionalProperties, "maxAlerts")
|
|
delete(additionalProperties, "mcpRateLimit")
|
|
delete(additionalProperties, "modelApi")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableWorldLimitsBlock struct {
|
|
value *WorldLimitsBlock
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableWorldLimitsBlock) Get() *WorldLimitsBlock {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableWorldLimitsBlock) Set(val *WorldLimitsBlock) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableWorldLimitsBlock) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableWorldLimitsBlock) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableWorldLimitsBlock(val *WorldLimitsBlock) *NullableWorldLimitsBlock {
|
|
return &NullableWorldLimitsBlock{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableWorldLimitsBlock) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableWorldLimitsBlock) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|