Files
sdk/model_agent_gpu.go

231 lines
5.4 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 AgentGPU type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &AgentGPU{}
// AgentGPU struct for AgentGPU
type AgentGPU struct {
// VRAM bytes, 0 = unknown
Memory *int64 `json:"memory,omitempty"`
// \"GB10\", \"8060S\", \"RTX 4090\"
Model *string `json:"model,omitempty"`
// nvidia | amd | apple | intel | ...
Vendor *string `json:"vendor,omitempty"`
AdditionalProperties map[string]interface{}
}
type _AgentGPU AgentGPU
// NewAgentGPU instantiates a new AgentGPU 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 NewAgentGPU() *AgentGPU {
this := AgentGPU{}
return &this
}
// NewAgentGPUWithDefaults instantiates a new AgentGPU 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 NewAgentGPUWithDefaults() *AgentGPU {
this := AgentGPU{}
return &this
}
// GetMemory returns the Memory field value if set, zero value otherwise.
func (o *AgentGPU) GetMemory() int64 {
if o == nil || IsNil(o.Memory) {
var ret int64
return ret
}
return *o.Memory
}
// GetMemoryOk returns a tuple with the Memory field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AgentGPU) GetMemoryOk() (*int64, bool) {
if o == nil || IsNil(o.Memory) {
return nil, false
}
return o.Memory, true
}
// HasMemory returns a boolean if a field has been set.
func (o *AgentGPU) HasMemory() bool {
if o != nil && !IsNil(o.Memory) {
return true
}
return false
}
// SetMemory gets a reference to the given int64 and assigns it to the Memory field.
func (o *AgentGPU) SetMemory(v int64) {
o.Memory = &v
}
// GetModel returns the Model field value if set, zero value otherwise.
func (o *AgentGPU) GetModel() string {
if o == nil || IsNil(o.Model) {
var ret string
return ret
}
return *o.Model
}
// GetModelOk returns a tuple with the Model field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AgentGPU) GetModelOk() (*string, bool) {
if o == nil || IsNil(o.Model) {
return nil, false
}
return o.Model, true
}
// HasModel returns a boolean if a field has been set.
func (o *AgentGPU) HasModel() bool {
if o != nil && !IsNil(o.Model) {
return true
}
return false
}
// SetModel gets a reference to the given string and assigns it to the Model field.
func (o *AgentGPU) SetModel(v string) {
o.Model = &v
}
// GetVendor returns the Vendor field value if set, zero value otherwise.
func (o *AgentGPU) GetVendor() string {
if o == nil || IsNil(o.Vendor) {
var ret string
return ret
}
return *o.Vendor
}
// GetVendorOk returns a tuple with the Vendor field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AgentGPU) GetVendorOk() (*string, bool) {
if o == nil || IsNil(o.Vendor) {
return nil, false
}
return o.Vendor, true
}
// HasVendor returns a boolean if a field has been set.
func (o *AgentGPU) HasVendor() bool {
if o != nil && !IsNil(o.Vendor) {
return true
}
return false
}
// SetVendor gets a reference to the given string and assigns it to the Vendor field.
func (o *AgentGPU) SetVendor(v string) {
o.Vendor = &v
}
func (o AgentGPU) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o AgentGPU) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Memory) {
toSerialize["memory"] = o.Memory
}
if !IsNil(o.Model) {
toSerialize["model"] = o.Model
}
if !IsNil(o.Vendor) {
toSerialize["vendor"] = o.Vendor
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *AgentGPU) UnmarshalJSON(data []byte) (err error) {
varAgentGPU := _AgentGPU{}
err = json.Unmarshal(data, &varAgentGPU)
if err != nil {
return err
}
*o = AgentGPU(varAgentGPU)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "memory")
delete(additionalProperties, "model")
delete(additionalProperties, "vendor")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableAgentGPU struct {
value *AgentGPU
isSet bool
}
func (v NullableAgentGPU) Get() *AgentGPU {
return v.value
}
func (v *NullableAgentGPU) Set(val *AgentGPU) {
v.value = val
v.isSet = true
}
func (v NullableAgentGPU) IsSet() bool {
return v.isSet
}
func (v *NullableAgentGPU) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableAgentGPU(val *AgentGPU) *NullableAgentGPU {
return &NullableAgentGPU{value: val, isSet: true}
}
func (v NullableAgentGPU) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableAgentGPU) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}