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 AdminComponentIdentities type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &AdminComponentIdentities{}
// AdminComponentIdentities struct for AdminComponentIdentities
type AdminComponentIdentities struct {
Api AdminComponentIdentitiesApi `json:"api"`
Runners []AdminComponentVersionCount `json:"runners"`
ObservedAt time.Time `json:"observedAt"`
AdditionalProperties map[string]interface{}
}
type _AdminComponentIdentities AdminComponentIdentities
// NewAdminComponentIdentities instantiates a new AdminComponentIdentities 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 NewAdminComponentIdentities(api AdminComponentIdentitiesApi, runners []AdminComponentVersionCount, observedAt time.Time) *AdminComponentIdentities {
this := AdminComponentIdentities{}
this.Api = api
this.Runners = runners
this.ObservedAt = observedAt
return &this
}
// NewAdminComponentIdentitiesWithDefaults instantiates a new AdminComponentIdentities 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 NewAdminComponentIdentitiesWithDefaults() *AdminComponentIdentities {
this := AdminComponentIdentities{}
return &this
}
// GetApi returns the Api field value
func (o *AdminComponentIdentities) GetApi() AdminComponentIdentitiesApi {
if o == nil {
var ret AdminComponentIdentitiesApi
return ret
}
return o.Api
}
// GetApiOk returns a tuple with the Api field value
// and a boolean to check if the value has been set.
func (o *AdminComponentIdentities) GetApiOk() (*AdminComponentIdentitiesApi, bool) {
if o == nil {
return nil, false
}
return &o.Api, true
}
// SetApi sets field value
func (o *AdminComponentIdentities) SetApi(v AdminComponentIdentitiesApi) {
o.Api = v
}
// GetRunners returns the Runners field value
func (o *AdminComponentIdentities) GetRunners() []AdminComponentVersionCount {
if o == nil {
var ret []AdminComponentVersionCount
return ret
}
return o.Runners
}
// GetRunnersOk returns a tuple with the Runners field value
// and a boolean to check if the value has been set.
func (o *AdminComponentIdentities) GetRunnersOk() ([]AdminComponentVersionCount, bool) {
if o == nil {
return nil, false
}
return o.Runners, true
}
// SetRunners sets field value
func (o *AdminComponentIdentities) SetRunners(v []AdminComponentVersionCount) {
o.Runners = v
}
// GetObservedAt returns the ObservedAt field value
func (o *AdminComponentIdentities) 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 *AdminComponentIdentities) GetObservedAtOk() (*time.Time, bool) {
if o == nil {
return nil, false
}
return &o.ObservedAt, true
}
// SetObservedAt sets field value
func (o *AdminComponentIdentities) SetObservedAt(v time.Time) {
o.ObservedAt = v
}
func (o AdminComponentIdentities) MarshalJSON() ([]byte, error) {
toSerialize,err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o AdminComponentIdentities) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
toSerialize["api"] = o.Api
toSerialize["runners"] = o.Runners
toSerialize["observedAt"] = o.ObservedAt
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *AdminComponentIdentities) 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{
"api",
"runners",
"observedAt",
}
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)
}
}
varAdminComponentIdentities := _AdminComponentIdentities{}
err = json.Unmarshal(data, &varAdminComponentIdentities)
if err != nil {
return err
}
*o = AdminComponentIdentities(varAdminComponentIdentities)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "api")
delete(additionalProperties, "runners")
delete(additionalProperties, "observedAt")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableAdminComponentIdentities struct {
value *AdminComponentIdentities
isSet bool
}
func (v NullableAdminComponentIdentities) Get() *AdminComponentIdentities {
return v.value
}
func (v *NullableAdminComponentIdentities) Set(val *AdminComponentIdentities) {
v.value = val
v.isSet = true
}
func (v NullableAdminComponentIdentities) IsSet() bool {
return v.isSet
}
func (v *NullableAdminComponentIdentities) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableAdminComponentIdentities(val *AdminComponentIdentities) *NullableAdminComponentIdentities {
return &NullableAdminComponentIdentities{value: val, isSet: true}
}
func (v NullableAdminComponentIdentities) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableAdminComponentIdentities) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}