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"
)
// checks if the CreateVolume type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &CreateVolume{}
// CreateVolume struct for CreateVolume
type CreateVolume struct {
Name *string `json:"name,omitempty"`
// The storage class of the volume; defaults to standard
StorageBackend *string `json:"storageBackend,omitempty"`
// The Filestore instance the volume stores its data on; filestore volumes only. Omit to assign from configured instances.
Instance *string `json:"instance,omitempty"`
AdditionalProperties map[string]interface{}
}
type _CreateVolume CreateVolume
// NewCreateVolume instantiates a new CreateVolume 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 NewCreateVolume() *CreateVolume {
this := CreateVolume{}
return &this
}
// NewCreateVolumeWithDefaults instantiates a new CreateVolume 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 NewCreateVolumeWithDefaults() *CreateVolume {
this := CreateVolume{}
return &this
}
// GetName returns the Name field value if set, zero value otherwise.
func (o *CreateVolume) GetName() string {
if o == nil || IsNil(o.Name) {
var ret string
return ret
}
return *o.Name
}
// GetNameOk returns a tuple with the Name field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CreateVolume) GetNameOk() (*string, bool) {
if o == nil || IsNil(o.Name) {
return nil, false
}
return o.Name, true
}
// HasName returns a boolean if a field has been set.
func (o *CreateVolume) HasName() bool {
if o != nil && !IsNil(o.Name) {
return true
}
return false
}
// SetName gets a reference to the given string and assigns it to the Name field.
func (o *CreateVolume) SetName(v string) {
o.Name = &v
}
// GetStorageBackend returns the StorageBackend field value if set, zero value otherwise.
func (o *CreateVolume) GetStorageBackend() string {
if o == nil || IsNil(o.StorageBackend) {
var ret string
return ret
}
return *o.StorageBackend
}
// GetStorageBackendOk returns a tuple with the StorageBackend field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CreateVolume) GetStorageBackendOk() (*string, bool) {
if o == nil || IsNil(o.StorageBackend) {
return nil, false
}
return o.StorageBackend, true
}
// HasStorageBackend returns a boolean if a field has been set.
func (o *CreateVolume) HasStorageBackend() bool {
if o != nil && !IsNil(o.StorageBackend) {
return true
}
return false
}
// SetStorageBackend gets a reference to the given string and assigns it to the StorageBackend field.
func (o *CreateVolume) SetStorageBackend(v string) {
o.StorageBackend = &v
}
// GetInstance returns the Instance field value if set, zero value otherwise.
func (o *CreateVolume) GetInstance() string {
if o == nil || IsNil(o.Instance) {
var ret string
return ret
}
return *o.Instance
}
// GetInstanceOk returns a tuple with the Instance field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *CreateVolume) GetInstanceOk() (*string, bool) {
if o == nil || IsNil(o.Instance) {
return nil, false
}
return o.Instance, true
}
// HasInstance returns a boolean if a field has been set.
func (o *CreateVolume) HasInstance() bool {
if o != nil && !IsNil(o.Instance) {
return true
}
return false
}
// SetInstance gets a reference to the given string and assigns it to the Instance field.
func (o *CreateVolume) SetInstance(v string) {
o.Instance = &v
}
func (o CreateVolume) MarshalJSON() ([]byte, error) {
toSerialize,err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o CreateVolume) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Name) {
toSerialize["name"] = o.Name
}
if !IsNil(o.StorageBackend) {
toSerialize["storageBackend"] = o.StorageBackend
}
if !IsNil(o.Instance) {
toSerialize["instance"] = o.Instance
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *CreateVolume) UnmarshalJSON(data []byte) (err error) {
varCreateVolume := _CreateVolume{}
err = json.Unmarshal(data, &varCreateVolume)
if err != nil {
return err
}
*o = CreateVolume(varCreateVolume)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "name")
delete(additionalProperties, "storageBackend")
delete(additionalProperties, "instance")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableCreateVolume struct {
value *CreateVolume
isSet bool
}
func (v NullableCreateVolume) Get() *CreateVolume {
return v.value
}
func (v *NullableCreateVolume) Set(val *CreateVolume) {
v.value = val
v.isSet = true
}
func (v NullableCreateVolume) IsSet() bool {
return v.isSet
}
func (v *NullableCreateVolume) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableCreateVolume(val *CreateVolume) *NullableCreateVolume {
return &NullableCreateVolume{value: val, isSet: true}
}
func (v NullableCreateVolume) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableCreateVolume) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}