The micro-VM for AI agents — light enough to embed on your laptop, elastic enough to power an agentic cloud.
/*
BoxLite
BoxLite AI platform API Docs
API version: 1.0
Contact: [email protected]
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package apiclient
import (
"encoding/json"
)
// checks if the RateLimitConfig type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &RateLimitConfig{}
// RateLimitConfig struct for RateLimitConfig
type RateLimitConfig struct {
// Failed authentication rate limit
FailedAuth *RateLimitEntry `json:"failedAuth,omitempty"`
// Authenticated rate limit
Authenticated *RateLimitEntry `json:"authenticated,omitempty"`
// Box create rate limit
BoxCreate *RateLimitEntry `json:"boxCreate,omitempty"`
// Box lifecycle rate limit
BoxLifecycle *RateLimitEntry `json:"boxLifecycle,omitempty"`
AdditionalProperties map[string]interface{}
}
type _RateLimitConfig RateLimitConfig
// NewRateLimitConfig instantiates a new RateLimitConfig 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 NewRateLimitConfig() *RateLimitConfig {
this := RateLimitConfig{}
return &this
}
// NewRateLimitConfigWithDefaults instantiates a new RateLimitConfig 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 NewRateLimitConfigWithDefaults() *RateLimitConfig {
this := RateLimitConfig{}
return &this
}
// GetFailedAuth returns the FailedAuth field value if set, zero value otherwise.
func (o *RateLimitConfig) GetFailedAuth() RateLimitEntry {
if o == nil || IsNil(o.FailedAuth) {
var ret RateLimitEntry
return ret
}
return *o.FailedAuth
}
// GetFailedAuthOk returns a tuple with the FailedAuth field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *RateLimitConfig) GetFailedAuthOk() (*RateLimitEntry, bool) {
if o == nil || IsNil(o.FailedAuth) {
return nil, false
}
return o.FailedAuth, true
}
// HasFailedAuth returns a boolean if a field has been set.
func (o *RateLimitConfig) HasFailedAuth() bool {
if o != nil && !IsNil(o.FailedAuth) {
return true
}
return false
}
// SetFailedAuth gets a reference to the given RateLimitEntry and assigns it to the FailedAuth field.
func (o *RateLimitConfig) SetFailedAuth(v RateLimitEntry) {
o.FailedAuth = &v
}
// GetAuthenticated returns the Authenticated field value if set, zero value otherwise.
func (o *RateLimitConfig) GetAuthenticated() RateLimitEntry {
if o == nil || IsNil(o.Authenticated) {
var ret RateLimitEntry
return ret
}
return *o.Authenticated
}
// GetAuthenticatedOk returns a tuple with the Authenticated field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *RateLimitConfig) GetAuthenticatedOk() (*RateLimitEntry, bool) {
if o == nil || IsNil(o.Authenticated) {
return nil, false
}
return o.Authenticated, true
}
// HasAuthenticated returns a boolean if a field has been set.
func (o *RateLimitConfig) HasAuthenticated() bool {
if o != nil && !IsNil(o.Authenticated) {
return true
}
return false
}
// SetAuthenticated gets a reference to the given RateLimitEntry and assigns it to the Authenticated field.
func (o *RateLimitConfig) SetAuthenticated(v RateLimitEntry) {
o.Authenticated = &v
}
// GetBoxCreate returns the BoxCreate field value if set, zero value otherwise.
func (o *RateLimitConfig) GetBoxCreate() RateLimitEntry {
if o == nil || IsNil(o.BoxCreate) {
var ret RateLimitEntry
return ret
}
return *o.BoxCreate
}
// GetBoxCreateOk returns a tuple with the BoxCreate field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *RateLimitConfig) GetBoxCreateOk() (*RateLimitEntry, bool) {
if o == nil || IsNil(o.BoxCreate) {
return nil, false
}
return o.BoxCreate, true
}
// HasBoxCreate returns a boolean if a field has been set.
func (o *RateLimitConfig) HasBoxCreate() bool {
if o != nil && !IsNil(o.BoxCreate) {
return true
}
return false
}
// SetBoxCreate gets a reference to the given RateLimitEntry and assigns it to the BoxCreate field.
func (o *RateLimitConfig) SetBoxCreate(v RateLimitEntry) {
o.BoxCreate = &v
}
// GetBoxLifecycle returns the BoxLifecycle field value if set, zero value otherwise.
func (o *RateLimitConfig) GetBoxLifecycle() RateLimitEntry {
if o == nil || IsNil(o.BoxLifecycle) {
var ret RateLimitEntry
return ret
}
return *o.BoxLifecycle
}
// GetBoxLifecycleOk returns a tuple with the BoxLifecycle field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *RateLimitConfig) GetBoxLifecycleOk() (*RateLimitEntry, bool) {
if o == nil || IsNil(o.BoxLifecycle) {
return nil, false
}
return o.BoxLifecycle, true
}
// HasBoxLifecycle returns a boolean if a field has been set.
func (o *RateLimitConfig) HasBoxLifecycle() bool {
if o != nil && !IsNil(o.BoxLifecycle) {
return true
}
return false
}
// SetBoxLifecycle gets a reference to the given RateLimitEntry and assigns it to the BoxLifecycle field.
func (o *RateLimitConfig) SetBoxLifecycle(v RateLimitEntry) {
o.BoxLifecycle = &v
}
func (o RateLimitConfig) MarshalJSON() ([]byte, error) {
toSerialize,err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o RateLimitConfig) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.FailedAuth) {
toSerialize["failedAuth"] = o.FailedAuth
}
if !IsNil(o.Authenticated) {
toSerialize["authenticated"] = o.Authenticated
}
if !IsNil(o.BoxCreate) {
toSerialize["boxCreate"] = o.BoxCreate
}
if !IsNil(o.BoxLifecycle) {
toSerialize["boxLifecycle"] = o.BoxLifecycle
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *RateLimitConfig) UnmarshalJSON(data []byte) (err error) {
varRateLimitConfig := _RateLimitConfig{}
err = json.Unmarshal(data, &varRateLimitConfig)
if err != nil {
return err
}
*o = RateLimitConfig(varRateLimitConfig)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "failedAuth")
delete(additionalProperties, "authenticated")
delete(additionalProperties, "boxCreate")
delete(additionalProperties, "boxLifecycle")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableRateLimitConfig struct {
value *RateLimitConfig
isSet bool
}
func (v NullableRateLimitConfig) Get() *RateLimitConfig {
return v.value
}
func (v *NullableRateLimitConfig) Set(val *RateLimitConfig) {
v.value = val
v.isSet = true
}
func (v NullableRateLimitConfig) IsSet() bool {
return v.isSet
}
func (v *NullableRateLimitConfig) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableRateLimitConfig(val *RateLimitConfig) *NullableRateLimitConfig {
return &NullableRateLimitConfig{value: val, isSet: true}
}
func (v NullableRateLimitConfig) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableRateLimitConfig) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}