Files
sdk/model_compute_byo_gpu.go

269 lines
7.3 KiB
Go

/*
Hanzo Cloud API
The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
API version: v1
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package hanzoai
import (
"encoding/json"
)
// checks if the ComputeByoGPU type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &ComputeByoGPU{}
// ComputeByoGPU struct for ComputeByoGPU
type ComputeByoGPU struct {
// Arch is the card's native compile target (\"gfx1151\"), which is what a kernel has to be built for. AMD reports one; NVIDIA cards leave it empty.
Arch *string `json:"arch,omitempty"`
// MemoryTotal is the card's VRAM in the units the host reported it in (\"122880 MiB\") — a display string, not a byte count. On a unified part it is the shared CPU/GPU pool, so it is not memory reserved for the GPU.
MemoryTotal *string `json:"memoryTotal,omitempty"`
// Name is the card's model exactly as its own tooling named it (\"NVIDIA GB10\"), never normalized — an operator matches what they see here against what nvidia-smi tells them on the box.
Name *string `json:"name,omitempty"`
// Unified reports that CPU and GPU share one memory pool (an APU or SoC), so MemoryTotal is not private to the GPU and the host competes for it.
Unified *bool `json:"unified,omitempty"`
AdditionalProperties map[string]interface{}
}
type _ComputeByoGPU ComputeByoGPU
// NewComputeByoGPU instantiates a new ComputeByoGPU 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 NewComputeByoGPU() *ComputeByoGPU {
this := ComputeByoGPU{}
return &this
}
// NewComputeByoGPUWithDefaults instantiates a new ComputeByoGPU 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 NewComputeByoGPUWithDefaults() *ComputeByoGPU {
this := ComputeByoGPU{}
return &this
}
// GetArch returns the Arch field value if set, zero value otherwise.
func (o *ComputeByoGPU) GetArch() string {
if o == nil || IsNil(o.Arch) {
var ret string
return ret
}
return *o.Arch
}
// GetArchOk returns a tuple with the Arch field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ComputeByoGPU) GetArchOk() (*string, bool) {
if o == nil || IsNil(o.Arch) {
return nil, false
}
return o.Arch, true
}
// HasArch returns a boolean if a field has been set.
func (o *ComputeByoGPU) HasArch() bool {
if o != nil && !IsNil(o.Arch) {
return true
}
return false
}
// SetArch gets a reference to the given string and assigns it to the Arch field.
func (o *ComputeByoGPU) SetArch(v string) {
o.Arch = &v
}
// GetMemoryTotal returns the MemoryTotal field value if set, zero value otherwise.
func (o *ComputeByoGPU) GetMemoryTotal() string {
if o == nil || IsNil(o.MemoryTotal) {
var ret string
return ret
}
return *o.MemoryTotal
}
// GetMemoryTotalOk returns a tuple with the MemoryTotal field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ComputeByoGPU) GetMemoryTotalOk() (*string, bool) {
if o == nil || IsNil(o.MemoryTotal) {
return nil, false
}
return o.MemoryTotal, true
}
// HasMemoryTotal returns a boolean if a field has been set.
func (o *ComputeByoGPU) HasMemoryTotal() bool {
if o != nil && !IsNil(o.MemoryTotal) {
return true
}
return false
}
// SetMemoryTotal gets a reference to the given string and assigns it to the MemoryTotal field.
func (o *ComputeByoGPU) SetMemoryTotal(v string) {
o.MemoryTotal = &v
}
// GetName returns the Name field value if set, zero value otherwise.
func (o *ComputeByoGPU) 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 *ComputeByoGPU) 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 *ComputeByoGPU) 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 *ComputeByoGPU) SetName(v string) {
o.Name = &v
}
// GetUnified returns the Unified field value if set, zero value otherwise.
func (o *ComputeByoGPU) GetUnified() bool {
if o == nil || IsNil(o.Unified) {
var ret bool
return ret
}
return *o.Unified
}
// GetUnifiedOk returns a tuple with the Unified field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ComputeByoGPU) GetUnifiedOk() (*bool, bool) {
if o == nil || IsNil(o.Unified) {
return nil, false
}
return o.Unified, true
}
// HasUnified returns a boolean if a field has been set.
func (o *ComputeByoGPU) HasUnified() bool {
if o != nil && !IsNil(o.Unified) {
return true
}
return false
}
// SetUnified gets a reference to the given bool and assigns it to the Unified field.
func (o *ComputeByoGPU) SetUnified(v bool) {
o.Unified = &v
}
func (o ComputeByoGPU) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o ComputeByoGPU) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Arch) {
toSerialize["arch"] = o.Arch
}
if !IsNil(o.MemoryTotal) {
toSerialize["memoryTotal"] = o.MemoryTotal
}
if !IsNil(o.Name) {
toSerialize["name"] = o.Name
}
if !IsNil(o.Unified) {
toSerialize["unified"] = o.Unified
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *ComputeByoGPU) UnmarshalJSON(data []byte) (err error) {
varComputeByoGPU := _ComputeByoGPU{}
err = json.Unmarshal(data, &varComputeByoGPU)
if err != nil {
return err
}
*o = ComputeByoGPU(varComputeByoGPU)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "arch")
delete(additionalProperties, "memoryTotal")
delete(additionalProperties, "name")
delete(additionalProperties, "unified")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableComputeByoGPU struct {
value *ComputeByoGPU
isSet bool
}
func (v NullableComputeByoGPU) Get() *ComputeByoGPU {
return v.value
}
func (v *NullableComputeByoGPU) Set(val *ComputeByoGPU) {
v.value = val
v.isSet = true
}
func (v NullableComputeByoGPU) IsSet() bool {
return v.isSet
}
func (v *NullableComputeByoGPU) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableComputeByoGPU(val *ComputeByoGPU) *NullableComputeByoGPU {
return &NullableComputeByoGPU{value: val, isSet: true}
}
func (v NullableComputeByoGPU) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableComputeByoGPU) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}