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"
)
// RegistryCredentialKind the model 'RegistryCredentialKind'
type RegistryCredentialKind string
// List of RegistryCredentialKind
const (
REGISTRYCREDENTIALKIND_BASIC RegistryCredentialKind = "basic"
REGISTRYCREDENTIALKIND_UNKNOWN_DEFAULT_OPEN_API RegistryCredentialKind = "unknown_default_open_api"
)
// All allowed values of RegistryCredentialKind enum
var AllowedRegistryCredentialKindEnumValues = []RegistryCredentialKind{
"basic",
"unknown_default_open_api",
}
func (v *RegistryCredentialKind) UnmarshalJSON(src []byte) error {
var value string
err := json.Unmarshal(src, &value)
if err != nil {
return err
}
enumTypeValue := RegistryCredentialKind(value)
for _, existing := range AllowedRegistryCredentialKindEnumValues {
if existing == enumTypeValue {
*v = enumTypeValue
return nil
}
}
*v = REGISTRYCREDENTIALKIND_UNKNOWN_DEFAULT_OPEN_API
return nil
}
// NewRegistryCredentialKindFromValue returns a pointer to a valid RegistryCredentialKind
// for the value passed as argument, or an error if the value passed is not allowed by the enum
func NewRegistryCredentialKindFromValue(v string) (*RegistryCredentialKind, error) {
ev := RegistryCredentialKind(v)
if ev.IsValid() {
return &ev, nil
} else {
enumValue := REGISTRYCREDENTIALKIND_UNKNOWN_DEFAULT_OPEN_API
return &enumValue, nil
}
}
// IsValid return true if the value is valid for the enum, false otherwise
func (v RegistryCredentialKind) IsValid() bool {
for _, existing := range AllowedRegistryCredentialKindEnumValues {
if existing == v {
return true
}
}
return false
}
// Ptr returns reference to RegistryCredentialKind value
func (v RegistryCredentialKind) Ptr() *RegistryCredentialKind {
return &v
}
type NullableRegistryCredentialKind struct {
value *RegistryCredentialKind
isSet bool
}
func (v NullableRegistryCredentialKind) Get() *RegistryCredentialKind {
return v.value
}
func (v *NullableRegistryCredentialKind) Set(val *RegistryCredentialKind) {
v.value = val
v.isSet = true
}
func (v NullableRegistryCredentialKind) IsSet() bool {
return v.isSet
}
func (v *NullableRegistryCredentialKind) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableRegistryCredentialKind(val *RegistryCredentialKind) *NullableRegistryCredentialKind {
return &NullableRegistryCredentialKind{value: val, isSet: true}
}
func (v NullableRegistryCredentialKind) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableRegistryCredentialKind) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}