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"
)
// BoxClass The class of the runner
type BoxClass string
// List of BoxClass
const (
BOXCLASS_SMALL BoxClass = "small"
BOXCLASS_MEDIUM BoxClass = "medium"
BOXCLASS_LARGE BoxClass = "large"
BOXCLASS_UNKNOWN_DEFAULT_OPEN_API BoxClass = "unknown_default_open_api"
)
// All allowed values of BoxClass enum
var AllowedBoxClassEnumValues = []BoxClass{
"small",
"medium",
"large",
"unknown_default_open_api",
}
func (v *BoxClass) UnmarshalJSON(src []byte) error {
var value string
err := json.Unmarshal(src, &value)
if err != nil {
return err
}
enumTypeValue := BoxClass(value)
for _, existing := range AllowedBoxClassEnumValues {
if existing == enumTypeValue {
*v = enumTypeValue
return nil
}
}
*v = BOXCLASS_UNKNOWN_DEFAULT_OPEN_API
return nil
}
// NewBoxClassFromValue returns a pointer to a valid BoxClass
// for the value passed as argument, or an error if the value passed is not allowed by the enum
func NewBoxClassFromValue(v string) (*BoxClass, error) {
ev := BoxClass(v)
if ev.IsValid() {
return &ev, nil
} else {
enumValue := BOXCLASS_UNKNOWN_DEFAULT_OPEN_API
return &enumValue, nil
}
}
// IsValid return true if the value is valid for the enum, false otherwise
func (v BoxClass) IsValid() bool {
for _, existing := range AllowedBoxClassEnumValues {
if existing == v {
return true
}
}
return false
}
// Ptr returns reference to BoxClass value
func (v BoxClass) Ptr() *BoxClass {
return &v
}
type NullableBoxClass struct {
value *BoxClass
isSet bool
}
func (v NullableBoxClass) Get() *BoxClass {
return v.value
}
func (v *NullableBoxClass) Set(val *BoxClass) {
v.value = val
v.isSet = true
}
func (v NullableBoxClass) IsSet() bool {
return v.isSet
}
func (v *NullableBoxClass) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableBoxClass(val *BoxClass) *NullableBoxClass {
return &NullableBoxClass{value: val, isSet: true}
}
func (v NullableBoxClass) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableBoxClass) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}