Files
runtime/libs/api-client-go/model_update_organization_quota.go
zeekay 0c7efccf40 feat: Add new Dockerfiles and improve containerization
- Add main Dockerfile for production builds
- Add Dockerfile.runtime for secure code execution
- Add Dockerfile.runtime.fixed with improved configuration
- Include .dockerignore for build optimization
- Add integration documentation and publishing guides
- Update API and CLI components for better runtime support
- Enhance sandbox and container management features
2025-08-16 23:03:39 -05:00

400 lines
13 KiB
Go
Generated

/*
Runtime
Runtime 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 (
"bytes"
"encoding/json"
"fmt"
)
// checks if the UpdateOrganizationQuota type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &UpdateOrganizationQuota{}
// UpdateOrganizationQuota struct for UpdateOrganizationQuota
type UpdateOrganizationQuota struct {
TotalCpuQuota NullableFloat32 `json:"totalCpuQuota"`
TotalMemoryQuota NullableFloat32 `json:"totalMemoryQuota"`
TotalDiskQuota NullableFloat32 `json:"totalDiskQuota"`
MaxCpuPerSandbox NullableFloat32 `json:"maxCpuPerSandbox"`
MaxMemoryPerSandbox NullableFloat32 `json:"maxMemoryPerSandbox"`
MaxDiskPerSandbox NullableFloat32 `json:"maxDiskPerSandbox"`
SnapshotQuota NullableFloat32 `json:"snapshotQuota"`
MaxSnapshotSize NullableFloat32 `json:"maxSnapshotSize"`
VolumeQuota NullableFloat32 `json:"volumeQuota"`
}
type _UpdateOrganizationQuota UpdateOrganizationQuota
// NewUpdateOrganizationQuota instantiates a new UpdateOrganizationQuota 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 NewUpdateOrganizationQuota(totalCpuQuota NullableFloat32, totalMemoryQuota NullableFloat32, totalDiskQuota NullableFloat32, maxCpuPerSandbox NullableFloat32, maxMemoryPerSandbox NullableFloat32, maxDiskPerSandbox NullableFloat32, snapshotQuota NullableFloat32, maxSnapshotSize NullableFloat32, volumeQuota NullableFloat32) *UpdateOrganizationQuota {
this := UpdateOrganizationQuota{}
this.TotalCpuQuota = totalCpuQuota
this.TotalMemoryQuota = totalMemoryQuota
this.TotalDiskQuota = totalDiskQuota
this.MaxCpuPerSandbox = maxCpuPerSandbox
this.MaxMemoryPerSandbox = maxMemoryPerSandbox
this.MaxDiskPerSandbox = maxDiskPerSandbox
this.SnapshotQuota = snapshotQuota
this.MaxSnapshotSize = maxSnapshotSize
this.VolumeQuota = volumeQuota
return &this
}
// NewUpdateOrganizationQuotaWithDefaults instantiates a new UpdateOrganizationQuota 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 NewUpdateOrganizationQuotaWithDefaults() *UpdateOrganizationQuota {
this := UpdateOrganizationQuota{}
return &this
}
// GetTotalCpuQuota returns the TotalCpuQuota field value
// If the value is explicit nil, the zero value for float32 will be returned
func (o *UpdateOrganizationQuota) GetTotalCpuQuota() float32 {
if o == nil || o.TotalCpuQuota.Get() == nil {
var ret float32
return ret
}
return *o.TotalCpuQuota.Get()
}
// GetTotalCpuQuotaOk returns a tuple with the TotalCpuQuota 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 *UpdateOrganizationQuota) GetTotalCpuQuotaOk() (*float32, bool) {
if o == nil {
return nil, false
}
return o.TotalCpuQuota.Get(), o.TotalCpuQuota.IsSet()
}
// SetTotalCpuQuota sets field value
func (o *UpdateOrganizationQuota) SetTotalCpuQuota(v float32) {
o.TotalCpuQuota.Set(&v)
}
// GetTotalMemoryQuota returns the TotalMemoryQuota field value
// If the value is explicit nil, the zero value for float32 will be returned
func (o *UpdateOrganizationQuota) GetTotalMemoryQuota() float32 {
if o == nil || o.TotalMemoryQuota.Get() == nil {
var ret float32
return ret
}
return *o.TotalMemoryQuota.Get()
}
// GetTotalMemoryQuotaOk returns a tuple with the TotalMemoryQuota 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 *UpdateOrganizationQuota) GetTotalMemoryQuotaOk() (*float32, bool) {
if o == nil {
return nil, false
}
return o.TotalMemoryQuota.Get(), o.TotalMemoryQuota.IsSet()
}
// SetTotalMemoryQuota sets field value
func (o *UpdateOrganizationQuota) SetTotalMemoryQuota(v float32) {
o.TotalMemoryQuota.Set(&v)
}
// GetTotalDiskQuota returns the TotalDiskQuota field value
// If the value is explicit nil, the zero value for float32 will be returned
func (o *UpdateOrganizationQuota) GetTotalDiskQuota() float32 {
if o == nil || o.TotalDiskQuota.Get() == nil {
var ret float32
return ret
}
return *o.TotalDiskQuota.Get()
}
// GetTotalDiskQuotaOk returns a tuple with the TotalDiskQuota 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 *UpdateOrganizationQuota) GetTotalDiskQuotaOk() (*float32, bool) {
if o == nil {
return nil, false
}
return o.TotalDiskQuota.Get(), o.TotalDiskQuota.IsSet()
}
// SetTotalDiskQuota sets field value
func (o *UpdateOrganizationQuota) SetTotalDiskQuota(v float32) {
o.TotalDiskQuota.Set(&v)
}
// GetMaxCpuPerSandbox returns the MaxCpuPerSandbox field value
// If the value is explicit nil, the zero value for float32 will be returned
func (o *UpdateOrganizationQuota) GetMaxCpuPerSandbox() float32 {
if o == nil || o.MaxCpuPerSandbox.Get() == nil {
var ret float32
return ret
}
return *o.MaxCpuPerSandbox.Get()
}
// GetMaxCpuPerSandboxOk returns a tuple with the MaxCpuPerSandbox 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 *UpdateOrganizationQuota) GetMaxCpuPerSandboxOk() (*float32, bool) {
if o == nil {
return nil, false
}
return o.MaxCpuPerSandbox.Get(), o.MaxCpuPerSandbox.IsSet()
}
// SetMaxCpuPerSandbox sets field value
func (o *UpdateOrganizationQuota) SetMaxCpuPerSandbox(v float32) {
o.MaxCpuPerSandbox.Set(&v)
}
// GetMaxMemoryPerSandbox returns the MaxMemoryPerSandbox field value
// If the value is explicit nil, the zero value for float32 will be returned
func (o *UpdateOrganizationQuota) GetMaxMemoryPerSandbox() float32 {
if o == nil || o.MaxMemoryPerSandbox.Get() == nil {
var ret float32
return ret
}
return *o.MaxMemoryPerSandbox.Get()
}
// GetMaxMemoryPerSandboxOk returns a tuple with the MaxMemoryPerSandbox 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 *UpdateOrganizationQuota) GetMaxMemoryPerSandboxOk() (*float32, bool) {
if o == nil {
return nil, false
}
return o.MaxMemoryPerSandbox.Get(), o.MaxMemoryPerSandbox.IsSet()
}
// SetMaxMemoryPerSandbox sets field value
func (o *UpdateOrganizationQuota) SetMaxMemoryPerSandbox(v float32) {
o.MaxMemoryPerSandbox.Set(&v)
}
// GetMaxDiskPerSandbox returns the MaxDiskPerSandbox field value
// If the value is explicit nil, the zero value for float32 will be returned
func (o *UpdateOrganizationQuota) GetMaxDiskPerSandbox() float32 {
if o == nil || o.MaxDiskPerSandbox.Get() == nil {
var ret float32
return ret
}
return *o.MaxDiskPerSandbox.Get()
}
// GetMaxDiskPerSandboxOk returns a tuple with the MaxDiskPerSandbox 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 *UpdateOrganizationQuota) GetMaxDiskPerSandboxOk() (*float32, bool) {
if o == nil {
return nil, false
}
return o.MaxDiskPerSandbox.Get(), o.MaxDiskPerSandbox.IsSet()
}
// SetMaxDiskPerSandbox sets field value
func (o *UpdateOrganizationQuota) SetMaxDiskPerSandbox(v float32) {
o.MaxDiskPerSandbox.Set(&v)
}
// GetSnapshotQuota returns the SnapshotQuota field value
// If the value is explicit nil, the zero value for float32 will be returned
func (o *UpdateOrganizationQuota) GetSnapshotQuota() float32 {
if o == nil || o.SnapshotQuota.Get() == nil {
var ret float32
return ret
}
return *o.SnapshotQuota.Get()
}
// GetSnapshotQuotaOk returns a tuple with the SnapshotQuota 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 *UpdateOrganizationQuota) GetSnapshotQuotaOk() (*float32, bool) {
if o == nil {
return nil, false
}
return o.SnapshotQuota.Get(), o.SnapshotQuota.IsSet()
}
// SetSnapshotQuota sets field value
func (o *UpdateOrganizationQuota) SetSnapshotQuota(v float32) {
o.SnapshotQuota.Set(&v)
}
// GetMaxSnapshotSize returns the MaxSnapshotSize field value
// If the value is explicit nil, the zero value for float32 will be returned
func (o *UpdateOrganizationQuota) GetMaxSnapshotSize() float32 {
if o == nil || o.MaxSnapshotSize.Get() == nil {
var ret float32
return ret
}
return *o.MaxSnapshotSize.Get()
}
// GetMaxSnapshotSizeOk returns a tuple with the MaxSnapshotSize 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 *UpdateOrganizationQuota) GetMaxSnapshotSizeOk() (*float32, bool) {
if o == nil {
return nil, false
}
return o.MaxSnapshotSize.Get(), o.MaxSnapshotSize.IsSet()
}
// SetMaxSnapshotSize sets field value
func (o *UpdateOrganizationQuota) SetMaxSnapshotSize(v float32) {
o.MaxSnapshotSize.Set(&v)
}
// GetVolumeQuota returns the VolumeQuota field value
// If the value is explicit nil, the zero value for float32 will be returned
func (o *UpdateOrganizationQuota) GetVolumeQuota() float32 {
if o == nil || o.VolumeQuota.Get() == nil {
var ret float32
return ret
}
return *o.VolumeQuota.Get()
}
// GetVolumeQuotaOk returns a tuple with the VolumeQuota 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 *UpdateOrganizationQuota) GetVolumeQuotaOk() (*float32, bool) {
if o == nil {
return nil, false
}
return o.VolumeQuota.Get(), o.VolumeQuota.IsSet()
}
// SetVolumeQuota sets field value
func (o *UpdateOrganizationQuota) SetVolumeQuota(v float32) {
o.VolumeQuota.Set(&v)
}
func (o UpdateOrganizationQuota) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o UpdateOrganizationQuota) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
toSerialize["totalCpuQuota"] = o.TotalCpuQuota.Get()
toSerialize["totalMemoryQuota"] = o.TotalMemoryQuota.Get()
toSerialize["totalDiskQuota"] = o.TotalDiskQuota.Get()
toSerialize["maxCpuPerSandbox"] = o.MaxCpuPerSandbox.Get()
toSerialize["maxMemoryPerSandbox"] = o.MaxMemoryPerSandbox.Get()
toSerialize["maxDiskPerSandbox"] = o.MaxDiskPerSandbox.Get()
toSerialize["snapshotQuota"] = o.SnapshotQuota.Get()
toSerialize["maxSnapshotSize"] = o.MaxSnapshotSize.Get()
toSerialize["volumeQuota"] = o.VolumeQuota.Get()
return toSerialize, nil
}
func (o *UpdateOrganizationQuota) 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{
"totalCpuQuota",
"totalMemoryQuota",
"totalDiskQuota",
"maxCpuPerSandbox",
"maxMemoryPerSandbox",
"maxDiskPerSandbox",
"snapshotQuota",
"maxSnapshotSize",
"volumeQuota",
}
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)
}
}
varUpdateOrganizationQuota := _UpdateOrganizationQuota{}
decoder := json.NewDecoder(bytes.NewReader(data))
decoder.DisallowUnknownFields()
err = decoder.Decode(&varUpdateOrganizationQuota)
if err != nil {
return err
}
*o = UpdateOrganizationQuota(varUpdateOrganizationQuota)
return err
}
type NullableUpdateOrganizationQuota struct {
value *UpdateOrganizationQuota
isSet bool
}
func (v NullableUpdateOrganizationQuota) Get() *UpdateOrganizationQuota {
return v.value
}
func (v *NullableUpdateOrganizationQuota) Set(val *UpdateOrganizationQuota) {
v.value = val
v.isSet = true
}
func (v NullableUpdateOrganizationQuota) IsSet() bool {
return v.isSet
}
func (v *NullableUpdateOrganizationQuota) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableUpdateOrganizationQuota(val *UpdateOrganizationQuota) *NullableUpdateOrganizationQuota {
return &NullableUpdateOrganizationQuota{value: val, isSet: true}
}
func (v NullableUpdateOrganizationQuota) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableUpdateOrganizationQuota) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}