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 AdminOrganizationBox type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &AdminOrganizationBox{}
// AdminOrganizationBox struct for AdminOrganizationBox
type AdminOrganizationBox struct {
Id string `json:"id"`
Name string `json:"name"`
ObservedState string `json:"observedState"`
DesiredState string `json:"desiredState"`
RunnerId NullableString `json:"runnerId,omitempty"`
Region string `json:"region"`
ObservedAt time.Time `json:"observedAt"`
AdditionalProperties map[string]interface{}
}
type _AdminOrganizationBox AdminOrganizationBox
// NewAdminOrganizationBox instantiates a new AdminOrganizationBox 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 NewAdminOrganizationBox(id string, name string, observedState string, desiredState string, region string, observedAt time.Time) *AdminOrganizationBox {
this := AdminOrganizationBox{}
this.Id = id
this.Name = name
this.ObservedState = observedState
this.DesiredState = desiredState
this.Region = region
this.ObservedAt = observedAt
return &this
}
// NewAdminOrganizationBoxWithDefaults instantiates a new AdminOrganizationBox 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 NewAdminOrganizationBoxWithDefaults() *AdminOrganizationBox {
this := AdminOrganizationBox{}
return &this
}
// GetId returns the Id field value
func (o *AdminOrganizationBox) GetId() string {
if o == nil {
var ret string
return ret
}
return o.Id
}
// GetIdOk returns a tuple with the Id field value
// and a boolean to check if the value has been set.
func (o *AdminOrganizationBox) GetIdOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Id, true
}
// SetId sets field value
func (o *AdminOrganizationBox) SetId(v string) {
o.Id = v
}
// GetName returns the Name field value
func (o *AdminOrganizationBox) GetName() string {
if o == nil {
var ret string
return ret
}
return o.Name
}
// GetNameOk returns a tuple with the Name field value
// and a boolean to check if the value has been set.
func (o *AdminOrganizationBox) GetNameOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Name, true
}
// SetName sets field value
func (o *AdminOrganizationBox) SetName(v string) {
o.Name = v
}
// GetObservedState returns the ObservedState field value
func (o *AdminOrganizationBox) GetObservedState() string {
if o == nil {
var ret string
return ret
}
return o.ObservedState
}
// GetObservedStateOk returns a tuple with the ObservedState field value
// and a boolean to check if the value has been set.
func (o *AdminOrganizationBox) GetObservedStateOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.ObservedState, true
}
// SetObservedState sets field value
func (o *AdminOrganizationBox) SetObservedState(v string) {
o.ObservedState = v
}
// GetDesiredState returns the DesiredState field value
func (o *AdminOrganizationBox) GetDesiredState() string {
if o == nil {
var ret string
return ret
}
return o.DesiredState
}
// GetDesiredStateOk returns a tuple with the DesiredState field value
// and a boolean to check if the value has been set.
func (o *AdminOrganizationBox) GetDesiredStateOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.DesiredState, true
}
// SetDesiredState sets field value
func (o *AdminOrganizationBox) SetDesiredState(v string) {
o.DesiredState = v
}
// GetRunnerId returns the RunnerId field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *AdminOrganizationBox) GetRunnerId() string {
if o == nil || IsNil(o.RunnerId.Get()) {
var ret string
return ret
}
return *o.RunnerId.Get()
}
// GetRunnerIdOk returns a tuple with the RunnerId field value if set, nil otherwise
// 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 *AdminOrganizationBox) GetRunnerIdOk() (*string, bool) {
if o == nil {
return nil, false
}
return o.RunnerId.Get(), o.RunnerId.IsSet()
}
// HasRunnerId returns a boolean if a field has been set.
func (o *AdminOrganizationBox) HasRunnerId() bool {
if o != nil && o.RunnerId.IsSet() {
return true
}
return false
}
// SetRunnerId gets a reference to the given NullableString and assigns it to the RunnerId field.
func (o *AdminOrganizationBox) SetRunnerId(v string) {
o.RunnerId.Set(&v)
}
// SetRunnerIdNil sets the value for RunnerId to be an explicit nil
func (o *AdminOrganizationBox) SetRunnerIdNil() {
o.RunnerId.Set(nil)
}
// UnsetRunnerId ensures that no value is present for RunnerId, not even an explicit nil
func (o *AdminOrganizationBox) UnsetRunnerId() {
o.RunnerId.Unset()
}
// GetRegion returns the Region field value
func (o *AdminOrganizationBox) GetRegion() string {
if o == nil {
var ret string
return ret
}
return o.Region
}
// GetRegionOk returns a tuple with the Region field value
// and a boolean to check if the value has been set.
func (o *AdminOrganizationBox) GetRegionOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Region, true
}
// SetRegion sets field value
func (o *AdminOrganizationBox) SetRegion(v string) {
o.Region = v
}
// GetObservedAt returns the ObservedAt field value
func (o *AdminOrganizationBox) 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 *AdminOrganizationBox) GetObservedAtOk() (*time.Time, bool) {
if o == nil {
return nil, false
}
return &o.ObservedAt, true
}
// SetObservedAt sets field value
func (o *AdminOrganizationBox) SetObservedAt(v time.Time) {
o.ObservedAt = v
}
func (o AdminOrganizationBox) MarshalJSON() ([]byte, error) {
toSerialize,err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o AdminOrganizationBox) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
toSerialize["id"] = o.Id
toSerialize["name"] = o.Name
toSerialize["observedState"] = o.ObservedState
toSerialize["desiredState"] = o.DesiredState
if o.RunnerId.IsSet() {
toSerialize["runnerId"] = o.RunnerId.Get()
}
toSerialize["region"] = o.Region
toSerialize["observedAt"] = o.ObservedAt
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *AdminOrganizationBox) 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{
"id",
"name",
"observedState",
"desiredState",
"region",
"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)
}
}
varAdminOrganizationBox := _AdminOrganizationBox{}
err = json.Unmarshal(data, &varAdminOrganizationBox)
if err != nil {
return err
}
*o = AdminOrganizationBox(varAdminOrganizationBox)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "id")
delete(additionalProperties, "name")
delete(additionalProperties, "observedState")
delete(additionalProperties, "desiredState")
delete(additionalProperties, "runnerId")
delete(additionalProperties, "region")
delete(additionalProperties, "observedAt")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableAdminOrganizationBox struct {
value *AdminOrganizationBox
isSet bool
}
func (v NullableAdminOrganizationBox) Get() *AdminOrganizationBox {
return v.value
}
func (v *NullableAdminOrganizationBox) Set(val *AdminOrganizationBox) {
v.value = val
v.isSet = true
}
func (v NullableAdminOrganizationBox) IsSet() bool {
return v.isSet
}
func (v *NullableAdminOrganizationBox) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableAdminOrganizationBox(val *AdminOrganizationBox) *NullableAdminOrganizationBox {
return &NullableAdminOrganizationBox{value: val, isSet: true}
}
func (v NullableAdminOrganizationBox) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableAdminOrganizationBox) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}