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 AdminUsageValues type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &AdminUsageValues{}
// AdminUsageValues struct for AdminUsageValues
type AdminUsageValues struct {
// Recorded allocated vCPU-seconds as an exact decimal string.
ComputeVcpuSeconds *string `json:"computeVcpuSeconds,omitempty"`
// Recorded allocated byte-seconds as an exact decimal string.
StorageByteSeconds *string `json:"storageByteSeconds,omitempty"`
// Recorded allocated GiB-seconds as an exact decimal string.
MemoryGibSeconds *string `json:"memoryGibSeconds,omitempty"`
AdditionalProperties map[string]interface{}
}
type _AdminUsageValues AdminUsageValues
// NewAdminUsageValues instantiates a new AdminUsageValues 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 NewAdminUsageValues() *AdminUsageValues {
this := AdminUsageValues{}
return &this
}
// NewAdminUsageValuesWithDefaults instantiates a new AdminUsageValues 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 NewAdminUsageValuesWithDefaults() *AdminUsageValues {
this := AdminUsageValues{}
return &this
}
// GetComputeVcpuSeconds returns the ComputeVcpuSeconds field value if set, zero value otherwise.
func (o *AdminUsageValues) GetComputeVcpuSeconds() string {
if o == nil || IsNil(o.ComputeVcpuSeconds) {
var ret string
return ret
}
return *o.ComputeVcpuSeconds
}
// GetComputeVcpuSecondsOk returns a tuple with the ComputeVcpuSeconds field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AdminUsageValues) GetComputeVcpuSecondsOk() (*string, bool) {
if o == nil || IsNil(o.ComputeVcpuSeconds) {
return nil, false
}
return o.ComputeVcpuSeconds, true
}
// HasComputeVcpuSeconds returns a boolean if a field has been set.
func (o *AdminUsageValues) HasComputeVcpuSeconds() bool {
if o != nil && !IsNil(o.ComputeVcpuSeconds) {
return true
}
return false
}
// SetComputeVcpuSeconds gets a reference to the given string and assigns it to the ComputeVcpuSeconds field.
func (o *AdminUsageValues) SetComputeVcpuSeconds(v string) {
o.ComputeVcpuSeconds = &v
}
// GetStorageByteSeconds returns the StorageByteSeconds field value if set, zero value otherwise.
func (o *AdminUsageValues) GetStorageByteSeconds() string {
if o == nil || IsNil(o.StorageByteSeconds) {
var ret string
return ret
}
return *o.StorageByteSeconds
}
// GetStorageByteSecondsOk returns a tuple with the StorageByteSeconds field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AdminUsageValues) GetStorageByteSecondsOk() (*string, bool) {
if o == nil || IsNil(o.StorageByteSeconds) {
return nil, false
}
return o.StorageByteSeconds, true
}
// HasStorageByteSeconds returns a boolean if a field has been set.
func (o *AdminUsageValues) HasStorageByteSeconds() bool {
if o != nil && !IsNil(o.StorageByteSeconds) {
return true
}
return false
}
// SetStorageByteSeconds gets a reference to the given string and assigns it to the StorageByteSeconds field.
func (o *AdminUsageValues) SetStorageByteSeconds(v string) {
o.StorageByteSeconds = &v
}
// GetMemoryGibSeconds returns the MemoryGibSeconds field value if set, zero value otherwise.
func (o *AdminUsageValues) GetMemoryGibSeconds() string {
if o == nil || IsNil(o.MemoryGibSeconds) {
var ret string
return ret
}
return *o.MemoryGibSeconds
}
// GetMemoryGibSecondsOk returns a tuple with the MemoryGibSeconds field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AdminUsageValues) GetMemoryGibSecondsOk() (*string, bool) {
if o == nil || IsNil(o.MemoryGibSeconds) {
return nil, false
}
return o.MemoryGibSeconds, true
}
// HasMemoryGibSeconds returns a boolean if a field has been set.
func (o *AdminUsageValues) HasMemoryGibSeconds() bool {
if o != nil && !IsNil(o.MemoryGibSeconds) {
return true
}
return false
}
// SetMemoryGibSeconds gets a reference to the given string and assigns it to the MemoryGibSeconds field.
func (o *AdminUsageValues) SetMemoryGibSeconds(v string) {
o.MemoryGibSeconds = &v
}
func (o AdminUsageValues) MarshalJSON() ([]byte, error) {
toSerialize,err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o AdminUsageValues) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.ComputeVcpuSeconds) {
toSerialize["computeVcpuSeconds"] = o.ComputeVcpuSeconds
}
if !IsNil(o.StorageByteSeconds) {
toSerialize["storageByteSeconds"] = o.StorageByteSeconds
}
if !IsNil(o.MemoryGibSeconds) {
toSerialize["memoryGibSeconds"] = o.MemoryGibSeconds
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *AdminUsageValues) UnmarshalJSON(data []byte) (err error) {
varAdminUsageValues := _AdminUsageValues{}
err = json.Unmarshal(data, &varAdminUsageValues)
if err != nil {
return err
}
*o = AdminUsageValues(varAdminUsageValues)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "computeVcpuSeconds")
delete(additionalProperties, "storageByteSeconds")
delete(additionalProperties, "memoryGibSeconds")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableAdminUsageValues struct {
value *AdminUsageValues
isSet bool
}
func (v NullableAdminUsageValues) Get() *AdminUsageValues {
return v.value
}
func (v *NullableAdminUsageValues) Set(val *AdminUsageValues) {
v.value = val
v.isSet = true
}
func (v NullableAdminUsageValues) IsSet() bool {
return v.isSet
}
func (v *NullableAdminUsageValues) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableAdminUsageValues(val *AdminUsageValues) *NullableAdminUsageValues {
return &NullableAdminUsageValues{value: val, isSet: true}
}
func (v NullableAdminUsageValues) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableAdminUsageValues) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}