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"
"fmt"
)
// checks if the RunnerDataDiskRef type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &RunnerDataDiskRef{}
// RunnerDataDiskRef Cloud identity of the runner data disk. diskType names the backend so the API can tell expandable block disks from backends with a different resize path (e.g. Filestore); runners predating the field are treated as hyperdisk_balanced, the only type infra provisions today.
type RunnerDataDiskRef struct {
// Cloud provider of the data disk
Provider string `json:"provider"`
// Cloud project the data disk lives in
Project string `json:"project"`
// Cloud zone the data disk lives in
Zone string `json:"zone"`
// Name of the data disk, as the cloud API addresses it
DiskName string `json:"diskName"`
// Backend behind the identity (hyperdisk_balanced, filestore, ...). Omitted by runner binaries predating the field; the API then assumes hyperdisk_balanced, the only data disk infra provisions today.
DiskType *string `json:"diskType,omitempty"`
AdditionalProperties map[string]interface{}
}
type _RunnerDataDiskRef RunnerDataDiskRef
// NewRunnerDataDiskRef instantiates a new RunnerDataDiskRef 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 NewRunnerDataDiskRef(provider string, project string, zone string, diskName string) *RunnerDataDiskRef {
this := RunnerDataDiskRef{}
this.Provider = provider
this.Project = project
this.Zone = zone
this.DiskName = diskName
return &this
}
// NewRunnerDataDiskRefWithDefaults instantiates a new RunnerDataDiskRef 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 NewRunnerDataDiskRefWithDefaults() *RunnerDataDiskRef {
this := RunnerDataDiskRef{}
return &this
}
// GetProvider returns the Provider field value
func (o *RunnerDataDiskRef) GetProvider() string {
if o == nil {
var ret string
return ret
}
return o.Provider
}
// GetProviderOk returns a tuple with the Provider field value
// and a boolean to check if the value has been set.
func (o *RunnerDataDiskRef) GetProviderOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Provider, true
}
// SetProvider sets field value
func (o *RunnerDataDiskRef) SetProvider(v string) {
o.Provider = v
}
// GetProject returns the Project field value
func (o *RunnerDataDiskRef) GetProject() string {
if o == nil {
var ret string
return ret
}
return o.Project
}
// GetProjectOk returns a tuple with the Project field value
// and a boolean to check if the value has been set.
func (o *RunnerDataDiskRef) GetProjectOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Project, true
}
// SetProject sets field value
func (o *RunnerDataDiskRef) SetProject(v string) {
o.Project = v
}
// GetZone returns the Zone field value
func (o *RunnerDataDiskRef) GetZone() string {
if o == nil {
var ret string
return ret
}
return o.Zone
}
// GetZoneOk returns a tuple with the Zone field value
// and a boolean to check if the value has been set.
func (o *RunnerDataDiskRef) GetZoneOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Zone, true
}
// SetZone sets field value
func (o *RunnerDataDiskRef) SetZone(v string) {
o.Zone = v
}
// GetDiskName returns the DiskName field value
func (o *RunnerDataDiskRef) GetDiskName() string {
if o == nil {
var ret string
return ret
}
return o.DiskName
}
// GetDiskNameOk returns a tuple with the DiskName field value
// and a boolean to check if the value has been set.
func (o *RunnerDataDiskRef) GetDiskNameOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.DiskName, true
}
// SetDiskName sets field value
func (o *RunnerDataDiskRef) SetDiskName(v string) {
o.DiskName = v
}
// GetDiskType returns the DiskType field value if set, zero value otherwise.
func (o *RunnerDataDiskRef) GetDiskType() string {
if o == nil || IsNil(o.DiskType) {
var ret string
return ret
}
return *o.DiskType
}
// GetDiskTypeOk returns a tuple with the DiskType field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *RunnerDataDiskRef) GetDiskTypeOk() (*string, bool) {
if o == nil || IsNil(o.DiskType) {
return nil, false
}
return o.DiskType, true
}
// HasDiskType returns a boolean if a field has been set.
func (o *RunnerDataDiskRef) HasDiskType() bool {
if o != nil && !IsNil(o.DiskType) {
return true
}
return false
}
// SetDiskType gets a reference to the given string and assigns it to the DiskType field.
func (o *RunnerDataDiskRef) SetDiskType(v string) {
o.DiskType = &v
}
func (o RunnerDataDiskRef) MarshalJSON() ([]byte, error) {
toSerialize,err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o RunnerDataDiskRef) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
toSerialize["provider"] = o.Provider
toSerialize["project"] = o.Project
toSerialize["zone"] = o.Zone
toSerialize["diskName"] = o.DiskName
if !IsNil(o.DiskType) {
toSerialize["diskType"] = o.DiskType
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *RunnerDataDiskRef) 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{
"provider",
"project",
"zone",
"diskName",
}
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)
}
}
varRunnerDataDiskRef := _RunnerDataDiskRef{}
err = json.Unmarshal(data, &varRunnerDataDiskRef)
if err != nil {
return err
}
*o = RunnerDataDiskRef(varRunnerDataDiskRef)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "provider")
delete(additionalProperties, "project")
delete(additionalProperties, "zone")
delete(additionalProperties, "diskName")
delete(additionalProperties, "diskType")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableRunnerDataDiskRef struct {
value *RunnerDataDiskRef
isSet bool
}
func (v NullableRunnerDataDiskRef) Get() *RunnerDataDiskRef {
return v.value
}
func (v *NullableRunnerDataDiskRef) Set(val *RunnerDataDiskRef) {
v.value = val
v.isSet = true
}
func (v NullableRunnerDataDiskRef) IsSet() bool {
return v.isSet
}
func (v *NullableRunnerDataDiskRef) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableRunnerDataDiskRef(val *RunnerDataDiskRef) *NullableRunnerDataDiskRef {
return &NullableRunnerDataDiskRef{value: val, isSet: true}
}
func (v NullableRunnerDataDiskRef) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableRunnerDataDiskRef) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}