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 AdminOrganizationActivation type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &AdminOrganizationActivation{}
// AdminOrganizationActivation struct for AdminOrganizationActivation
type AdminOrganizationActivation struct {
OrganizationId string `json:"organizationId"`
// Maximum retained Box creation or warm-pool claim time; survives Box deletion. Null means none was recorded; organizations older than tracking only have retained creation times.
LastBoxCreatedAt NullableTime `json:"lastBoxCreatedAt"`
// Maximum observed successful-start or accepted-deletion time; cleanup, stops and label edits do not advance it. Null means none was recorded since tracking began.
LastBoxModifiedAt NullableTime `json:"lastBoxModifiedAt"`
ObservedAt time.Time `json:"observedAt"`
AdditionalProperties map[string]interface{}
}
type _AdminOrganizationActivation AdminOrganizationActivation
// NewAdminOrganizationActivation instantiates a new AdminOrganizationActivation 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 NewAdminOrganizationActivation(organizationId string, lastBoxCreatedAt NullableTime, lastBoxModifiedAt NullableTime, observedAt time.Time) *AdminOrganizationActivation {
this := AdminOrganizationActivation{}
this.OrganizationId = organizationId
this.LastBoxCreatedAt = lastBoxCreatedAt
this.LastBoxModifiedAt = lastBoxModifiedAt
this.ObservedAt = observedAt
return &this
}
// NewAdminOrganizationActivationWithDefaults instantiates a new AdminOrganizationActivation 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 NewAdminOrganizationActivationWithDefaults() *AdminOrganizationActivation {
this := AdminOrganizationActivation{}
return &this
}
// GetOrganizationId returns the OrganizationId field value
func (o *AdminOrganizationActivation) GetOrganizationId() string {
if o == nil {
var ret string
return ret
}
return o.OrganizationId
}
// GetOrganizationIdOk returns a tuple with the OrganizationId field value
// and a boolean to check if the value has been set.
func (o *AdminOrganizationActivation) GetOrganizationIdOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.OrganizationId, true
}
// SetOrganizationId sets field value
func (o *AdminOrganizationActivation) SetOrganizationId(v string) {
o.OrganizationId = v
}
// GetLastBoxCreatedAt returns the LastBoxCreatedAt field value
// If the value is explicit nil, the zero value for time.Time will be returned
func (o *AdminOrganizationActivation) GetLastBoxCreatedAt() time.Time {
if o == nil || o.LastBoxCreatedAt.Get() == nil {
var ret time.Time
return ret
}
return *o.LastBoxCreatedAt.Get()
}
// GetLastBoxCreatedAtOk returns a tuple with the LastBoxCreatedAt field value
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *AdminOrganizationActivation) GetLastBoxCreatedAtOk() (*time.Time, bool) {
if o == nil {
return nil, false
}
return o.LastBoxCreatedAt.Get(), o.LastBoxCreatedAt.IsSet()
}
// SetLastBoxCreatedAt sets field value
func (o *AdminOrganizationActivation) SetLastBoxCreatedAt(v time.Time) {
o.LastBoxCreatedAt.Set(&v)
}
// GetLastBoxModifiedAt returns the LastBoxModifiedAt field value
// If the value is explicit nil, the zero value for time.Time will be returned
func (o *AdminOrganizationActivation) GetLastBoxModifiedAt() time.Time {
if o == nil || o.LastBoxModifiedAt.Get() == nil {
var ret time.Time
return ret
}
return *o.LastBoxModifiedAt.Get()
}
// GetLastBoxModifiedAtOk returns a tuple with the LastBoxModifiedAt field value
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *AdminOrganizationActivation) GetLastBoxModifiedAtOk() (*time.Time, bool) {
if o == nil {
return nil, false
}
return o.LastBoxModifiedAt.Get(), o.LastBoxModifiedAt.IsSet()
}
// SetLastBoxModifiedAt sets field value
func (o *AdminOrganizationActivation) SetLastBoxModifiedAt(v time.Time) {
o.LastBoxModifiedAt.Set(&v)
}
// GetObservedAt returns the ObservedAt field value
func (o *AdminOrganizationActivation) 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 *AdminOrganizationActivation) GetObservedAtOk() (*time.Time, bool) {
if o == nil {
return nil, false
}
return &o.ObservedAt, true
}
// SetObservedAt sets field value
func (o *AdminOrganizationActivation) SetObservedAt(v time.Time) {
o.ObservedAt = v
}
func (o AdminOrganizationActivation) MarshalJSON() ([]byte, error) {
toSerialize,err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o AdminOrganizationActivation) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
toSerialize["organizationId"] = o.OrganizationId
toSerialize["lastBoxCreatedAt"] = o.LastBoxCreatedAt.Get()
toSerialize["lastBoxModifiedAt"] = o.LastBoxModifiedAt.Get()
toSerialize["observedAt"] = o.ObservedAt
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *AdminOrganizationActivation) 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{
"organizationId",
"lastBoxCreatedAt",
"lastBoxModifiedAt",
"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)
}
}
varAdminOrganizationActivation := _AdminOrganizationActivation{}
err = json.Unmarshal(data, &varAdminOrganizationActivation)
if err != nil {
return err
}
*o = AdminOrganizationActivation(varAdminOrganizationActivation)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "organizationId")
delete(additionalProperties, "lastBoxCreatedAt")
delete(additionalProperties, "lastBoxModifiedAt")
delete(additionalProperties, "observedAt")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableAdminOrganizationActivation struct {
value *AdminOrganizationActivation
isSet bool
}
func (v NullableAdminOrganizationActivation) Get() *AdminOrganizationActivation {
return v.value
}
func (v *NullableAdminOrganizationActivation) Set(val *AdminOrganizationActivation) {
v.value = val
v.isSet = true
}
func (v NullableAdminOrganizationActivation) IsSet() bool {
return v.isSet
}
func (v *NullableAdminOrganizationActivation) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableAdminOrganizationActivation(val *AdminOrganizationActivation) *NullableAdminOrganizationActivation {
return &NullableAdminOrganizationActivation{value: val, isSet: true}
}
func (v NullableAdminOrganizationActivation) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableAdminOrganizationActivation) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}