Skip to content

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

4.6 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 AdminComponentIdentitiesApi type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &AdminComponentIdentitiesApi{}

// AdminComponentIdentitiesApi struct for AdminComponentIdentitiesApi
type AdminComponentIdentitiesApi struct {
	Version NullableString `json:"version,omitempty"`
	AdditionalProperties map[string]interface{}
}

type _AdminComponentIdentitiesApi AdminComponentIdentitiesApi

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

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

// GetVersion returns the Version field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *AdminComponentIdentitiesApi) GetVersion() string {
	if o == nil || IsNil(o.Version.Get()) {
		var ret string
		return ret
	}
	return *o.Version.Get()
}

// GetVersionOk returns a tuple with the Version 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 *AdminComponentIdentitiesApi) GetVersionOk() (*string, bool) {
	if o == nil {
		return nil, false
	}
	return o.Version.Get(), o.Version.IsSet()
}

// HasVersion returns a boolean if a field has been set.
func (o *AdminComponentIdentitiesApi) HasVersion() bool {
	if o != nil && o.Version.IsSet() {
		return true
	}

	return false
}

// SetVersion gets a reference to the given NullableString and assigns it to the Version field.
func (o *AdminComponentIdentitiesApi) SetVersion(v string) {
	o.Version.Set(&v)
}
// SetVersionNil sets the value for Version to be an explicit nil
func (o *AdminComponentIdentitiesApi) SetVersionNil() {
	o.Version.Set(nil)
}

// UnsetVersion ensures that no value is present for Version, not even an explicit nil
func (o *AdminComponentIdentitiesApi) UnsetVersion() {
	o.Version.Unset()
}

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

func (o AdminComponentIdentitiesApi) ToMap() (map[string]interface{}, error) {
	toSerialize := map[string]interface{}{}
	if o.Version.IsSet() {
		toSerialize["version"] = o.Version.Get()
	}

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

	return toSerialize, nil
}

func (o *AdminComponentIdentitiesApi) UnmarshalJSON(data []byte) (err error) {
	varAdminComponentIdentitiesApi := _AdminComponentIdentitiesApi{}

	err = json.Unmarshal(data, &varAdminComponentIdentitiesApi)

	if err != nil {
		return err
	}

	*o = AdminComponentIdentitiesApi(varAdminComponentIdentitiesApi)

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

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

	return err
}

type NullableAdminComponentIdentitiesApi struct {
	value *AdminComponentIdentitiesApi
	isSet bool
}

func (v NullableAdminComponentIdentitiesApi) Get() *AdminComponentIdentitiesApi {
	return v.value
}

func (v *NullableAdminComponentIdentitiesApi) Set(val *AdminComponentIdentitiesApi) {
	v.value = val
	v.isSet = true
}

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

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

func NewNullableAdminComponentIdentitiesApi(val *AdminComponentIdentitiesApi) *NullableAdminComponentIdentitiesApi {
	return &NullableAdminComponentIdentitiesApi{value: val, isSet: true}
}

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

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