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"
"time"
"fmt"
)
// checks if the UsageConcurrencyPointDto type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &UsageConcurrencyPointDto{}
// UsageConcurrencyPointDto struct for UsageConcurrencyPointDto
type UsageConcurrencyPointDto struct {
ObservedAt time.Time `json:"observedAt"`
RunningBoxes int32 `json:"runningBoxes"`
AdditionalProperties map[string]interface{}
}
type _UsageConcurrencyPointDto UsageConcurrencyPointDto
// NewUsageConcurrencyPointDto instantiates a new UsageConcurrencyPointDto 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 NewUsageConcurrencyPointDto(observedAt time.Time, runningBoxes int32) *UsageConcurrencyPointDto {
this := UsageConcurrencyPointDto{}
this.ObservedAt = observedAt
this.RunningBoxes = runningBoxes
return &this
}
// NewUsageConcurrencyPointDtoWithDefaults instantiates a new UsageConcurrencyPointDto 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 NewUsageConcurrencyPointDtoWithDefaults() *UsageConcurrencyPointDto {
this := UsageConcurrencyPointDto{}
return &this
}
// GetObservedAt returns the ObservedAt field value
func (o *UsageConcurrencyPointDto) GetObservedAt() time.Time {
if o == nil {
var ret time.Time
return ret
}
return o.ObservedAt
}
// GetObservedAtOk returns a tuple with the ObservedAt field value
// and a boolean to check if the value has been set.
func (o *UsageConcurrencyPointDto) GetObservedAtOk() (*time.Time, bool) {
if o == nil {
return nil, false
}
return &o.ObservedAt, true
}
// SetObservedAt sets field value
func (o *UsageConcurrencyPointDto) SetObservedAt(v time.Time) {
o.ObservedAt = v
}
// GetRunningBoxes returns the RunningBoxes field value
func (o *UsageConcurrencyPointDto) GetRunningBoxes() int32 {
if o == nil {
var ret int32
return ret
}
return o.RunningBoxes
}
// GetRunningBoxesOk returns a tuple with the RunningBoxes field value
// and a boolean to check if the value has been set.
func (o *UsageConcurrencyPointDto) GetRunningBoxesOk() (*int32, bool) {
if o == nil {
return nil, false
}
return &o.RunningBoxes, true
}
// SetRunningBoxes sets field value
func (o *UsageConcurrencyPointDto) SetRunningBoxes(v int32) {
o.RunningBoxes = v
}
func (o UsageConcurrencyPointDto) MarshalJSON() ([]byte, error) {
toSerialize,err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o UsageConcurrencyPointDto) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
toSerialize["observedAt"] = o.ObservedAt
toSerialize["runningBoxes"] = o.RunningBoxes
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *UsageConcurrencyPointDto) UnmarshalJSON(data []byte) (err error) {
// This validates that all required properties are included in the JSON object
// by unmarshalling the object into a generic map with string keys and checking
// that every required field exists as a key in the generic map.
requiredProperties := []string{
"observedAt",
"runningBoxes",
}
allProperties := make(map[string]interface{})
err = json.Unmarshal(data, &allProperties)
if err != nil {
return err;
}
for _, requiredProperty := range(requiredProperties) {
if _, exists := allProperties[requiredProperty]; !exists {
return fmt.Errorf("no value given for required property %v", requiredProperty)
}
}
varUsageConcurrencyPointDto := _UsageConcurrencyPointDto{}
err = json.Unmarshal(data, &varUsageConcurrencyPointDto)
if err != nil {
return err
}
*o = UsageConcurrencyPointDto(varUsageConcurrencyPointDto)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "observedAt")
delete(additionalProperties, "runningBoxes")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableUsageConcurrencyPointDto struct {
value *UsageConcurrencyPointDto
isSet bool
}
func (v NullableUsageConcurrencyPointDto) Get() *UsageConcurrencyPointDto {
return v.value
}
func (v *NullableUsageConcurrencyPointDto) Set(val *UsageConcurrencyPointDto) {
v.value = val
v.isSet = true
}
func (v NullableUsageConcurrencyPointDto) IsSet() bool {
return v.isSet
}
func (v *NullableUsageConcurrencyPointDto) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableUsageConcurrencyPointDto(val *UsageConcurrencyPointDto) *NullableUsageConcurrencyPointDto {
return &NullableUsageConcurrencyPointDto{value: val, isSet: true}
}
func (v NullableUsageConcurrencyPointDto) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableUsageConcurrencyPointDto) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}