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"
)
// BoxProgressPhase What this box is waiting on while it is being created
type BoxProgressPhase string
// List of BoxProgressPhase
const (
BOXPROGRESSPHASE_PREPARING_IMAGE BoxProgressPhase = "preparing_image"
BOXPROGRESSPHASE_UNKNOWN_DEFAULT_OPEN_API BoxProgressPhase = "unknown_default_open_api"
)
// All allowed values of BoxProgressPhase enum
var AllowedBoxProgressPhaseEnumValues = []BoxProgressPhase{
"preparing_image",
"unknown_default_open_api",
}
func (v *BoxProgressPhase) UnmarshalJSON(src []byte) error {
var value string
err := json.Unmarshal(src, &value)
if err != nil {
return err
}
enumTypeValue := BoxProgressPhase(value)
for _, existing := range AllowedBoxProgressPhaseEnumValues {
if existing == enumTypeValue {
*v = enumTypeValue
return nil
}
}
*v = BOXPROGRESSPHASE_UNKNOWN_DEFAULT_OPEN_API
return nil
}
// NewBoxProgressPhaseFromValue returns a pointer to a valid BoxProgressPhase
// for the value passed as argument, or an error if the value passed is not allowed by the enum
func NewBoxProgressPhaseFromValue(v string) (*BoxProgressPhase, error) {
ev := BoxProgressPhase(v)
if ev.IsValid() {
return &ev, nil
} else {
enumValue := BOXPROGRESSPHASE_UNKNOWN_DEFAULT_OPEN_API
return &enumValue, nil
}
}
// IsValid return true if the value is valid for the enum, false otherwise
func (v BoxProgressPhase) IsValid() bool {
for _, existing := range AllowedBoxProgressPhaseEnumValues {
if existing == v {
return true
}
}
return false
}
// Ptr returns reference to BoxProgressPhase value
func (v BoxProgressPhase) Ptr() *BoxProgressPhase {
return &v
}
type NullableBoxProgressPhase struct {
value *BoxProgressPhase
isSet bool
}
func (v NullableBoxProgressPhase) Get() *BoxProgressPhase {
return v.value
}
func (v *NullableBoxProgressPhase) Set(val *BoxProgressPhase) {
v.value = val
v.isSet = true
}
func (v NullableBoxProgressPhase) IsSet() bool {
return v.isSet
}
func (v *NullableBoxProgressPhase) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableBoxProgressPhase(val *BoxProgressPhase) *NullableBoxProgressPhase {
return &NullableBoxProgressPhase{value: val, isSet: true}
}
func (v NullableBoxProgressPhase) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableBoxProgressPhase) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}