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"
)
// BoxDesiredState The desired state of the box
type BoxDesiredState string
// List of BoxDesiredState
const (
BOXDESIREDSTATE_DESTROYED BoxDesiredState = "destroyed"
BOXDESIREDSTATE_STARTED BoxDesiredState = "started"
BOXDESIREDSTATE_STOPPED BoxDesiredState = "stopped"
BOXDESIREDSTATE_RESIZED BoxDesiredState = "resized"
BOXDESIREDSTATE_UNKNOWN_DEFAULT_OPEN_API BoxDesiredState = "unknown_default_open_api"
)
// All allowed values of BoxDesiredState enum
var AllowedBoxDesiredStateEnumValues = []BoxDesiredState{
"destroyed",
"started",
"stopped",
"resized",
"unknown_default_open_api",
}
func (v *BoxDesiredState) UnmarshalJSON(src []byte) error {
var value string
err := json.Unmarshal(src, &value)
if err != nil {
return err
}
enumTypeValue := BoxDesiredState(value)
for _, existing := range AllowedBoxDesiredStateEnumValues {
if existing == enumTypeValue {
*v = enumTypeValue
return nil
}
}
*v = BOXDESIREDSTATE_UNKNOWN_DEFAULT_OPEN_API
return nil
}
// NewBoxDesiredStateFromValue returns a pointer to a valid BoxDesiredState
// for the value passed as argument, or an error if the value passed is not allowed by the enum
func NewBoxDesiredStateFromValue(v string) (*BoxDesiredState, error) {
ev := BoxDesiredState(v)
if ev.IsValid() {
return &ev, nil
} else {
enumValue := BOXDESIREDSTATE_UNKNOWN_DEFAULT_OPEN_API
return &enumValue, nil
}
}
// IsValid return true if the value is valid for the enum, false otherwise
func (v BoxDesiredState) IsValid() bool {
for _, existing := range AllowedBoxDesiredStateEnumValues {
if existing == v {
return true
}
}
return false
}
// Ptr returns reference to BoxDesiredState value
func (v BoxDesiredState) Ptr() *BoxDesiredState {
return &v
}
type NullableBoxDesiredState struct {
value *BoxDesiredState
isSet bool
}
func (v NullableBoxDesiredState) Get() *BoxDesiredState {
return v.value
}
func (v *NullableBoxDesiredState) Set(val *BoxDesiredState) {
v.value = val
v.isSet = true
}
func (v NullableBoxDesiredState) IsSet() bool {
return v.isSet
}
func (v *NullableBoxDesiredState) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableBoxDesiredState(val *BoxDesiredState) *NullableBoxDesiredState {
return &NullableBoxDesiredState{value: val, isSet: true}
}
func (v NullableBoxDesiredState) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableBoxDesiredState) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}