Skip to content

The micro-VM for AI agents — light enough to embed on your laptop, elastic enough to power an agentic cloud.

6.0 KB
Raw Blame
/*
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"
)

// checks if the AdminUsageDimensions type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &AdminUsageDimensions{}

// AdminUsageDimensions struct for AdminUsageDimensions
type AdminUsageDimensions struct {
	OrganizationId *string `json:"organizationId,omitempty"`
	RegionId *string `json:"regionId,omitempty"`
	BoxId *string `json:"boxId,omitempty"`
	AdditionalProperties map[string]interface{}
}

type _AdminUsageDimensions AdminUsageDimensions

// NewAdminUsageDimensions instantiates a new AdminUsageDimensions 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 NewAdminUsageDimensions() *AdminUsageDimensions {
	this := AdminUsageDimensions{}
	return &this
}

// NewAdminUsageDimensionsWithDefaults instantiates a new AdminUsageDimensions 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 NewAdminUsageDimensionsWithDefaults() *AdminUsageDimensions {
	this := AdminUsageDimensions{}
	return &this
}

// GetOrganizationId returns the OrganizationId field value if set, zero value otherwise.
func (o *AdminUsageDimensions) GetOrganizationId() string {
	if o == nil || IsNil(o.OrganizationId) {
		var ret string
		return ret
	}
	return *o.OrganizationId
}

// GetOrganizationIdOk returns a tuple with the OrganizationId field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AdminUsageDimensions) GetOrganizationIdOk() (*string, bool) {
	if o == nil || IsNil(o.OrganizationId) {
		return nil, false
	}
	return o.OrganizationId, true
}

// HasOrganizationId returns a boolean if a field has been set.
func (o *AdminUsageDimensions) HasOrganizationId() bool {
	if o != nil && !IsNil(o.OrganizationId) {
		return true
	}

	return false
}

// SetOrganizationId gets a reference to the given string and assigns it to the OrganizationId field.
func (o *AdminUsageDimensions) SetOrganizationId(v string) {
	o.OrganizationId = &v
}

// GetRegionId returns the RegionId field value if set, zero value otherwise.
func (o *AdminUsageDimensions) GetRegionId() string {
	if o == nil || IsNil(o.RegionId) {
		var ret string
		return ret
	}
	return *o.RegionId
}

// GetRegionIdOk returns a tuple with the RegionId field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AdminUsageDimensions) GetRegionIdOk() (*string, bool) {
	if o == nil || IsNil(o.RegionId) {
		return nil, false
	}
	return o.RegionId, true
}

// HasRegionId returns a boolean if a field has been set.
func (o *AdminUsageDimensions) HasRegionId() bool {
	if o != nil && !IsNil(o.RegionId) {
		return true
	}

	return false
}

// SetRegionId gets a reference to the given string and assigns it to the RegionId field.
func (o *AdminUsageDimensions) SetRegionId(v string) {
	o.RegionId = &v
}

// GetBoxId returns the BoxId field value if set, zero value otherwise.
func (o *AdminUsageDimensions) GetBoxId() string {
	if o == nil || IsNil(o.BoxId) {
		var ret string
		return ret
	}
	return *o.BoxId
}

// GetBoxIdOk returns a tuple with the BoxId field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AdminUsageDimensions) GetBoxIdOk() (*string, bool) {
	if o == nil || IsNil(o.BoxId) {
		return nil, false
	}
	return o.BoxId, true
}

// HasBoxId returns a boolean if a field has been set.
func (o *AdminUsageDimensions) HasBoxId() bool {
	if o != nil && !IsNil(o.BoxId) {
		return true
	}

	return false
}

// SetBoxId gets a reference to the given string and assigns it to the BoxId field.
func (o *AdminUsageDimensions) SetBoxId(v string) {
	o.BoxId = &v
}

func (o AdminUsageDimensions) MarshalJSON() ([]byte, error) {
	toSerialize,err := o.ToMap()
	if err != nil {
		return []byte{}, err
	}
	return json.Marshal(toSerialize)
}

func (o AdminUsageDimensions) ToMap() (map[string]interface{}, error) {
	toSerialize := map[string]interface{}{}
	if !IsNil(o.OrganizationId) {
		toSerialize["organizationId"] = o.OrganizationId
	}
	if !IsNil(o.RegionId) {
		toSerialize["regionId"] = o.RegionId
	}
	if !IsNil(o.BoxId) {
		toSerialize["boxId"] = o.BoxId
	}

	for key, value := range o.AdditionalProperties {
		toSerialize[key] = value
	}

	return toSerialize, nil
}

func (o *AdminUsageDimensions) UnmarshalJSON(data []byte) (err error) {
	varAdminUsageDimensions := _AdminUsageDimensions{}

	err = json.Unmarshal(data, &varAdminUsageDimensions)

	if err != nil {
		return err
	}

	*o = AdminUsageDimensions(varAdminUsageDimensions)

	additionalProperties := make(map[string]interface{})

	if err = json.Unmarshal(data, &additionalProperties); err == nil {
		delete(additionalProperties, "organizationId")
		delete(additionalProperties, "regionId")
		delete(additionalProperties, "boxId")
		o.AdditionalProperties = additionalProperties
	}

	return err
}

type NullableAdminUsageDimensions struct {
	value *AdminUsageDimensions
	isSet bool
}

func (v NullableAdminUsageDimensions) Get() *AdminUsageDimensions {
	return v.value
}

func (v *NullableAdminUsageDimensions) Set(val *AdminUsageDimensions) {
	v.value = val
	v.isSet = true
}

func (v NullableAdminUsageDimensions) IsSet() bool {
	return v.isSet
}

func (v *NullableAdminUsageDimensions) Unset() {
	v.value = nil
	v.isSet = false
}

func NewNullableAdminUsageDimensions(val *AdminUsageDimensions) *NullableAdminUsageDimensions {
	return &NullableAdminUsageDimensions{value: val, isSet: true}
}

func (v NullableAdminUsageDimensions) MarshalJSON() ([]byte, error) {
	return json.Marshal(v.value)
}

func (v *NullableAdminUsageDimensions) UnmarshalJSON(src []byte) error {
	v.isSet = true
	return json.Unmarshal(src, &v.value)
}