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 AdminOrganizationDetail type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &AdminOrganizationDetail{}
// AdminOrganizationDetail struct for AdminOrganizationDetail
type AdminOrganizationDetail struct {
// Organization creation time.
CreatedAt time.Time `json:"createdAt"`
// Stored creator ID; account linking replaces it with the primary user ID.
CreatedBy string `json:"createdBy"`
// Current creator identity.
Creator NullableAdminOrganizationCreator `json:"creator"`
OrganizationId string `json:"organizationId"`
Name string `json:"name"`
// Stored organization suspension flag; does not evaluate suspendedUntil. Older servers may omit it.
Suspended *bool `json:"suspended,omitempty"`
Members AdminOrganizationMemberPage `json:"members"`
Boxes AdminOrganizationBoxPage `json:"boxes"`
Impact AdminOrganizationImpact `json:"impact"`
Usage *AdminOrganizationUsage `json:"usage,omitempty"`
// Only with include=activation.
Activation NullableAdminOrganizationActivation `json:"activation,omitempty"`
ObservedAt time.Time `json:"observedAt"`
AdditionalProperties map[string]interface{}
}
type _AdminOrganizationDetail AdminOrganizationDetail
// NewAdminOrganizationDetail instantiates a new AdminOrganizationDetail 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 NewAdminOrganizationDetail(createdAt time.Time, createdBy string, creator NullableAdminOrganizationCreator, organizationId string, name string, members AdminOrganizationMemberPage, boxes AdminOrganizationBoxPage, impact AdminOrganizationImpact, observedAt time.Time) *AdminOrganizationDetail {
this := AdminOrganizationDetail{}
this.CreatedAt = createdAt
this.CreatedBy = createdBy
this.Creator = creator
this.OrganizationId = organizationId
this.Name = name
this.Members = members
this.Boxes = boxes
this.Impact = impact
this.ObservedAt = observedAt
return &this
}
// NewAdminOrganizationDetailWithDefaults instantiates a new AdminOrganizationDetail 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 NewAdminOrganizationDetailWithDefaults() *AdminOrganizationDetail {
this := AdminOrganizationDetail{}
return &this
}
// GetCreatedAt returns the CreatedAt field value
func (o *AdminOrganizationDetail) GetCreatedAt() time.Time {
if o == nil {
var ret time.Time
return ret
}
return o.CreatedAt
}
// GetCreatedAtOk returns a tuple with the CreatedAt field value
// and a boolean to check if the value has been set.
func (o *AdminOrganizationDetail) GetCreatedAtOk() (*time.Time, bool) {
if o == nil {
return nil, false
}
return &o.CreatedAt, true
}
// SetCreatedAt sets field value
func (o *AdminOrganizationDetail) SetCreatedAt(v time.Time) {
o.CreatedAt = v
}
// GetCreatedBy returns the CreatedBy field value
func (o *AdminOrganizationDetail) GetCreatedBy() string {
if o == nil {
var ret string
return ret
}
return o.CreatedBy
}
// GetCreatedByOk returns a tuple with the CreatedBy field value
// and a boolean to check if the value has been set.
func (o *AdminOrganizationDetail) GetCreatedByOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.CreatedBy, true
}
// SetCreatedBy sets field value
func (o *AdminOrganizationDetail) SetCreatedBy(v string) {
o.CreatedBy = v
}
// GetCreator returns the Creator field value
// If the value is explicit nil, the zero value for AdminOrganizationCreator will be returned
func (o *AdminOrganizationDetail) GetCreator() AdminOrganizationCreator {
if o == nil || o.Creator.Get() == nil {
var ret AdminOrganizationCreator
return ret
}
return *o.Creator.Get()
}
// GetCreatorOk returns a tuple with the Creator 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 *AdminOrganizationDetail) GetCreatorOk() (*AdminOrganizationCreator, bool) {
if o == nil {
return nil, false
}
return o.Creator.Get(), o.Creator.IsSet()
}
// SetCreator sets field value
func (o *AdminOrganizationDetail) SetCreator(v AdminOrganizationCreator) {
o.Creator.Set(&v)
}
// GetOrganizationId returns the OrganizationId field value
func (o *AdminOrganizationDetail) 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 *AdminOrganizationDetail) GetOrganizationIdOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.OrganizationId, true
}
// SetOrganizationId sets field value
func (o *AdminOrganizationDetail) SetOrganizationId(v string) {
o.OrganizationId = v
}
// GetName returns the Name field value
func (o *AdminOrganizationDetail) 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 *AdminOrganizationDetail) GetNameOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Name, true
}
// SetName sets field value
func (o *AdminOrganizationDetail) SetName(v string) {
o.Name = v
}
// GetSuspended returns the Suspended field value if set, zero value otherwise.
func (o *AdminOrganizationDetail) GetSuspended() bool {
if o == nil || IsNil(o.Suspended) {
var ret bool
return ret
}
return *o.Suspended
}
// GetSuspendedOk returns a tuple with the Suspended field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AdminOrganizationDetail) GetSuspendedOk() (*bool, bool) {
if o == nil || IsNil(o.Suspended) {
return nil, false
}
return o.Suspended, true
}
// HasSuspended returns a boolean if a field has been set.
func (o *AdminOrganizationDetail) HasSuspended() bool {
if o != nil && !IsNil(o.Suspended) {
return true
}
return false
}
// SetSuspended gets a reference to the given bool and assigns it to the Suspended field.
func (o *AdminOrganizationDetail) SetSuspended(v bool) {
o.Suspended = &v
}
// GetMembers returns the Members field value
func (o *AdminOrganizationDetail) GetMembers() AdminOrganizationMemberPage {
if o == nil {
var ret AdminOrganizationMemberPage
return ret
}
return o.Members
}
// GetMembersOk returns a tuple with the Members field value
// and a boolean to check if the value has been set.
func (o *AdminOrganizationDetail) GetMembersOk() (*AdminOrganizationMemberPage, bool) {
if o == nil {
return nil, false
}
return &o.Members, true
}
// SetMembers sets field value
func (o *AdminOrganizationDetail) SetMembers(v AdminOrganizationMemberPage) {
o.Members = v
}
// GetBoxes returns the Boxes field value
func (o *AdminOrganizationDetail) GetBoxes() AdminOrganizationBoxPage {
if o == nil {
var ret AdminOrganizationBoxPage
return ret
}
return o.Boxes
}
// GetBoxesOk returns a tuple with the Boxes field value
// and a boolean to check if the value has been set.
func (o *AdminOrganizationDetail) GetBoxesOk() (*AdminOrganizationBoxPage, bool) {
if o == nil {
return nil, false
}
return &o.Boxes, true
}
// SetBoxes sets field value
func (o *AdminOrganizationDetail) SetBoxes(v AdminOrganizationBoxPage) {
o.Boxes = v
}
// GetImpact returns the Impact field value
func (o *AdminOrganizationDetail) GetImpact() AdminOrganizationImpact {
if o == nil {
var ret AdminOrganizationImpact
return ret
}
return o.Impact
}
// GetImpactOk returns a tuple with the Impact field value
// and a boolean to check if the value has been set.
func (o *AdminOrganizationDetail) GetImpactOk() (*AdminOrganizationImpact, bool) {
if o == nil {
return nil, false
}
return &o.Impact, true
}
// SetImpact sets field value
func (o *AdminOrganizationDetail) SetImpact(v AdminOrganizationImpact) {
o.Impact = v
}
// GetUsage returns the Usage field value if set, zero value otherwise.
func (o *AdminOrganizationDetail) GetUsage() AdminOrganizationUsage {
if o == nil || IsNil(o.Usage) {
var ret AdminOrganizationUsage
return ret
}
return *o.Usage
}
// GetUsageOk returns a tuple with the Usage field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AdminOrganizationDetail) GetUsageOk() (*AdminOrganizationUsage, bool) {
if o == nil || IsNil(o.Usage) {
return nil, false
}
return o.Usage, true
}
// HasUsage returns a boolean if a field has been set.
func (o *AdminOrganizationDetail) HasUsage() bool {
if o != nil && !IsNil(o.Usage) {
return true
}
return false
}
// SetUsage gets a reference to the given AdminOrganizationUsage and assigns it to the Usage field.
func (o *AdminOrganizationDetail) SetUsage(v AdminOrganizationUsage) {
o.Usage = &v
}
// GetActivation returns the Activation field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *AdminOrganizationDetail) GetActivation() AdminOrganizationActivation {
if o == nil || IsNil(o.Activation.Get()) {
var ret AdminOrganizationActivation
return ret
}
return *o.Activation.Get()
}
// GetActivationOk returns a tuple with the Activation 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 *AdminOrganizationDetail) GetActivationOk() (*AdminOrganizationActivation, bool) {
if o == nil {
return nil, false
}
return o.Activation.Get(), o.Activation.IsSet()
}
// HasActivation returns a boolean if a field has been set.
func (o *AdminOrganizationDetail) HasActivation() bool {
if o != nil && o.Activation.IsSet() {
return true
}
return false
}
// SetActivation gets a reference to the given NullableAdminOrganizationActivation and assigns it to the Activation field.
func (o *AdminOrganizationDetail) SetActivation(v AdminOrganizationActivation) {
o.Activation.Set(&v)
}
// SetActivationNil sets the value for Activation to be an explicit nil
func (o *AdminOrganizationDetail) SetActivationNil() {
o.Activation.Set(nil)
}
// UnsetActivation ensures that no value is present for Activation, not even an explicit nil
func (o *AdminOrganizationDetail) UnsetActivation() {
o.Activation.Unset()
}
// GetObservedAt returns the ObservedAt field value
func (o *AdminOrganizationDetail) 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 *AdminOrganizationDetail) GetObservedAtOk() (*time.Time, bool) {
if o == nil {
return nil, false
}
return &o.ObservedAt, true
}
// SetObservedAt sets field value
func (o *AdminOrganizationDetail) SetObservedAt(v time.Time) {
o.ObservedAt = v
}
func (o AdminOrganizationDetail) MarshalJSON() ([]byte, error) {
toSerialize,err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o AdminOrganizationDetail) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
toSerialize["createdAt"] = o.CreatedAt
toSerialize["createdBy"] = o.CreatedBy
toSerialize["creator"] = o.Creator.Get()
toSerialize["organizationId"] = o.OrganizationId
toSerialize["name"] = o.Name
if !IsNil(o.Suspended) {
toSerialize["suspended"] = o.Suspended
}
toSerialize["members"] = o.Members
toSerialize["boxes"] = o.Boxes
toSerialize["impact"] = o.Impact
if !IsNil(o.Usage) {
toSerialize["usage"] = o.Usage
}
if o.Activation.IsSet() {
toSerialize["activation"] = o.Activation.Get()
}
toSerialize["observedAt"] = o.ObservedAt
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *AdminOrganizationDetail) 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{
"createdAt",
"createdBy",
"creator",
"organizationId",
"name",
"members",
"boxes",
"impact",
"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)
}
}
varAdminOrganizationDetail := _AdminOrganizationDetail{}
err = json.Unmarshal(data, &varAdminOrganizationDetail)
if err != nil {
return err
}
*o = AdminOrganizationDetail(varAdminOrganizationDetail)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "createdAt")
delete(additionalProperties, "createdBy")
delete(additionalProperties, "creator")
delete(additionalProperties, "organizationId")
delete(additionalProperties, "name")
delete(additionalProperties, "suspended")
delete(additionalProperties, "members")
delete(additionalProperties, "boxes")
delete(additionalProperties, "impact")
delete(additionalProperties, "usage")
delete(additionalProperties, "activation")
delete(additionalProperties, "observedAt")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableAdminOrganizationDetail struct {
value *AdminOrganizationDetail
isSet bool
}
func (v NullableAdminOrganizationDetail) Get() *AdminOrganizationDetail {
return v.value
}
func (v *NullableAdminOrganizationDetail) Set(val *AdminOrganizationDetail) {
v.value = val
v.isSet = true
}
func (v NullableAdminOrganizationDetail) IsSet() bool {
return v.isSet
}
func (v *NullableAdminOrganizationDetail) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableAdminOrganizationDetail(val *AdminOrganizationDetail) *NullableAdminOrganizationDetail {
return &NullableAdminOrganizationDetail{value: val, isSet: true}
}
func (v NullableAdminOrganizationDetail) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableAdminOrganizationDetail) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}