Files
sdk/model_compute_sample_view.go

1485 lines
40 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 ComputeSampleView type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &ComputeSampleView{}
// ComputeSampleView struct for ComputeSampleView
type ComputeSampleView struct {
// At is when the reading was MEASURED, RFC 3339 in UTC — the x-axis a chart plots against. The series is returned oldest first, so it only increases.
At *string `json:"at,omitempty"`
// CostCents is what this unit resold for over the hour the reading falls in, in whole US cents. 0 means UNPRICED, not free: the operator's own machines — a linked run-target, a dialed-in BYO worker — are metered for utilization and never resold, so only a priced source ever fills it.
CostCents *int64 `json:"costCents,omitempty"`
// CPUTemp is the CPU package temperature in °C.
CpuTemp *float64 `json:"cpuTemp,omitempty"`
// CPUUtil is the busy fraction of all cores over the sample window, 0..1.
CpuUtil *float64 `json:"cpuUtil,omitempty"`
// CPUs is logical cores. The static capability rides every row on purpose: a chart can size load against cores without joining a registry whose row may since have been rewritten or the unit deregistered.
Cpus *int64 `json:"cpus,omitempty"`
// Decode is generation throughput over the sample window, in tokens per second.
Decode *float64 `json:"decode,omitempty"`
// DiskRead is the block-device read rate in bytes per second.
DiskRead *float64 `json:"diskRead,omitempty"`
// DiskTotal is the size of those filesystems, in BYTES.
DiskTotal *int64 `json:"diskTotal,omitempty"`
// DiskUsed is the space used across local block filesystems, in BYTES.
DiskUsed *int64 `json:"diskUsed,omitempty"`
// DiskWrite is the block-device write rate in bytes per second.
DiskWrite *float64 `json:"diskWrite,omitempty"`
// GPUMemTotal is dedicated VRAM in BYTES; absent when the GPU shares system memory (unified).
GpuMemTotal *int64 `json:"gpuMemTotal,omitempty"`
// GPUMemUsed is the memory held by GPU processes, in BYTES.
GpuMemUsed *int64 `json:"gpuMemUsed,omitempty"`
// GPUModel names the representative accelerator (\"GB10\"); GPUs carries how many.
GpuModel *string `json:"gpuModel,omitempty"`
// GPUPower is the total GPU power draw in watts.
GpuPower *float64 `json:"gpuPower,omitempty"`
// GPUPowerLimit is the total enforced GPU power limit in watts; absent when the driver reports none.
GpuPowerLimit *float64 `json:"gpuPowerLimit,omitempty"`
// GPUTemp is the hottest GPU's temperature in °C.
GpuTemp *float64 `json:"gpuTemp,omitempty"`
// GPUUtil is aggregate accelerator utilization as a FRACTION of 1 — 0.42 is 42% busy. Anything a reporter sends outside 0..1 is clamped into it on write.
GpuUtil *float64 `json:"gpuUtil,omitempty"`
// GPUs is how many accelerators the reading covers.
Gpus *int64 `json:"gpus,omitempty"`
// Host is the hostname the unit reported at the time of the reading.
Host *string `json:"host,omitempty"`
// Kind is what the measured unit is: laptop, cloud, gpu, cluster, machine or worker.
Kind *string `json:"kind,omitempty"`
// KVCache is the KV-cache occupancy, 0..1.
KvCache *float64 `json:"kvCache,omitempty"`
// Load1 is the 1-minute load average — runnable processes, not a percentage.
Load1 *float64 `json:"load1,omitempty"`
// Load15 is the 15-minute load average, the same units as Load1.
Load15 *float64 `json:"load15,omitempty"`
// Load5 is the 5-minute load average, the same units as Load1.
Load5 *float64 `json:"load5,omitempty"`
// MemFree is host memory available, in BYTES, as reported rather than derived.
MemFree *int64 `json:"memFree,omitempty"`
// MemUsed is host memory in use, in BYTES.
MemUsed *int64 `json:"memUsed,omitempty"`
// Memory is total system RAM in BYTES at the time of the reading.
Memory *int64 `json:"memory,omitempty"`
// Model is the model id(s) served on the unit, comma-separated, at most 128 bytes.
Model *string `json:"model,omitempty"`
// NetRx is the receive rate of physical interfaces in bytes per second.
NetRx *float64 `json:"netRx,omitempty"`
// NetTx is the transmit rate of physical interfaces in bytes per second.
NetTx *float64 `json:"netTx,omitempty"`
// Prefill is prompt (prefill) throughput over the sample window, in tokens per second.
Prefill *float64 `json:"prefill,omitempty"`
// Running is the number of requests being served at the reading.
Running *int64 `json:"running,omitempty"`
// Source is the plane that reported the reading: \"agent\", \"byo\" or \"visor\" — the same vocabulary the board's rows carry, and what ?source= narrows on.
Source *string `json:"source,omitempty"`
// TTFT is the mean time to first token, in seconds, of requests that started in the window.
Ttft *float64 `json:"ttft,omitempty"`
// Unit is the source's own id for the measured unit. With Source it is the key the chart groups by, and the key the board joins a unit's latest reading on.
Unit *string `json:"unit,omitempty"`
// Waiting is the number of requests queued at the reading.
Waiting *int64 `json:"waiting,omitempty"`
AdditionalProperties map[string]interface{}
}
type _ComputeSampleView ComputeSampleView
// NewComputeSampleView instantiates a new ComputeSampleView 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 NewComputeSampleView() *ComputeSampleView {
this := ComputeSampleView{}
return &this
}
// NewComputeSampleViewWithDefaults instantiates a new ComputeSampleView 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 NewComputeSampleViewWithDefaults() *ComputeSampleView {
this := ComputeSampleView{}
return &this
}
// GetAt returns the At field value if set, zero value otherwise.
func (o *ComputeSampleView) GetAt() string {
if o == nil || IsNil(o.At) {
var ret string
return ret
}
return *o.At
}
// GetAtOk returns a tuple with the At field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ComputeSampleView) GetAtOk() (*string, bool) {
if o == nil || IsNil(o.At) {
return nil, false
}
return o.At, true
}
// HasAt returns a boolean if a field has been set.
func (o *ComputeSampleView) HasAt() bool {
if o != nil && !IsNil(o.At) {
return true
}
return false
}
// SetAt gets a reference to the given string and assigns it to the At field.
func (o *ComputeSampleView) SetAt(v string) {
o.At = &v
}
// GetCostCents returns the CostCents field value if set, zero value otherwise.
func (o *ComputeSampleView) GetCostCents() int64 {
if o == nil || IsNil(o.CostCents) {
var ret int64
return ret
}
return *o.CostCents
}
// GetCostCentsOk returns a tuple with the CostCents field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ComputeSampleView) GetCostCentsOk() (*int64, bool) {
if o == nil || IsNil(o.CostCents) {
return nil, false
}
return o.CostCents, true
}
// HasCostCents returns a boolean if a field has been set.
func (o *ComputeSampleView) HasCostCents() bool {
if o != nil && !IsNil(o.CostCents) {
return true
}
return false
}
// SetCostCents gets a reference to the given int64 and assigns it to the CostCents field.
func (o *ComputeSampleView) SetCostCents(v int64) {
o.CostCents = &v
}
// GetCpuTemp returns the CpuTemp field value if set, zero value otherwise.
func (o *ComputeSampleView) GetCpuTemp() float64 {
if o == nil || IsNil(o.CpuTemp) {
var ret float64
return ret
}
return *o.CpuTemp
}
// GetCpuTempOk returns a tuple with the CpuTemp field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ComputeSampleView) GetCpuTempOk() (*float64, bool) {
if o == nil || IsNil(o.CpuTemp) {
return nil, false
}
return o.CpuTemp, true
}
// HasCpuTemp returns a boolean if a field has been set.
func (o *ComputeSampleView) HasCpuTemp() bool {
if o != nil && !IsNil(o.CpuTemp) {
return true
}
return false
}
// SetCpuTemp gets a reference to the given float64 and assigns it to the CpuTemp field.
func (o *ComputeSampleView) SetCpuTemp(v float64) {
o.CpuTemp = &v
}
// GetCpuUtil returns the CpuUtil field value if set, zero value otherwise.
func (o *ComputeSampleView) GetCpuUtil() float64 {
if o == nil || IsNil(o.CpuUtil) {
var ret float64
return ret
}
return *o.CpuUtil
}
// GetCpuUtilOk returns a tuple with the CpuUtil field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ComputeSampleView) GetCpuUtilOk() (*float64, bool) {
if o == nil || IsNil(o.CpuUtil) {
return nil, false
}
return o.CpuUtil, true
}
// HasCpuUtil returns a boolean if a field has been set.
func (o *ComputeSampleView) HasCpuUtil() bool {
if o != nil && !IsNil(o.CpuUtil) {
return true
}
return false
}
// SetCpuUtil gets a reference to the given float64 and assigns it to the CpuUtil field.
func (o *ComputeSampleView) SetCpuUtil(v float64) {
o.CpuUtil = &v
}
// GetCpus returns the Cpus field value if set, zero value otherwise.
func (o *ComputeSampleView) GetCpus() int64 {
if o == nil || IsNil(o.Cpus) {
var ret int64
return ret
}
return *o.Cpus
}
// GetCpusOk returns a tuple with the Cpus field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ComputeSampleView) GetCpusOk() (*int64, bool) {
if o == nil || IsNil(o.Cpus) {
return nil, false
}
return o.Cpus, true
}
// HasCpus returns a boolean if a field has been set.
func (o *ComputeSampleView) HasCpus() bool {
if o != nil && !IsNil(o.Cpus) {
return true
}
return false
}
// SetCpus gets a reference to the given int64 and assigns it to the Cpus field.
func (o *ComputeSampleView) SetCpus(v int64) {
o.Cpus = &v
}
// GetDecode returns the Decode field value if set, zero value otherwise.
func (o *ComputeSampleView) GetDecode() float64 {
if o == nil || IsNil(o.Decode) {
var ret float64
return ret
}
return *o.Decode
}
// GetDecodeOk returns a tuple with the Decode field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ComputeSampleView) GetDecodeOk() (*float64, bool) {
if o == nil || IsNil(o.Decode) {
return nil, false
}
return o.Decode, true
}
// HasDecode returns a boolean if a field has been set.
func (o *ComputeSampleView) HasDecode() bool {
if o != nil && !IsNil(o.Decode) {
return true
}
return false
}
// SetDecode gets a reference to the given float64 and assigns it to the Decode field.
func (o *ComputeSampleView) SetDecode(v float64) {
o.Decode = &v
}
// GetDiskRead returns the DiskRead field value if set, zero value otherwise.
func (o *ComputeSampleView) GetDiskRead() float64 {
if o == nil || IsNil(o.DiskRead) {
var ret float64
return ret
}
return *o.DiskRead
}
// GetDiskReadOk returns a tuple with the DiskRead field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ComputeSampleView) GetDiskReadOk() (*float64, bool) {
if o == nil || IsNil(o.DiskRead) {
return nil, false
}
return o.DiskRead, true
}
// HasDiskRead returns a boolean if a field has been set.
func (o *ComputeSampleView) HasDiskRead() bool {
if o != nil && !IsNil(o.DiskRead) {
return true
}
return false
}
// SetDiskRead gets a reference to the given float64 and assigns it to the DiskRead field.
func (o *ComputeSampleView) SetDiskRead(v float64) {
o.DiskRead = &v
}
// GetDiskTotal returns the DiskTotal field value if set, zero value otherwise.
func (o *ComputeSampleView) GetDiskTotal() int64 {
if o == nil || IsNil(o.DiskTotal) {
var ret int64
return ret
}
return *o.DiskTotal
}
// GetDiskTotalOk returns a tuple with the DiskTotal field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ComputeSampleView) GetDiskTotalOk() (*int64, bool) {
if o == nil || IsNil(o.DiskTotal) {
return nil, false
}
return o.DiskTotal, true
}
// HasDiskTotal returns a boolean if a field has been set.
func (o *ComputeSampleView) HasDiskTotal() bool {
if o != nil && !IsNil(o.DiskTotal) {
return true
}
return false
}
// SetDiskTotal gets a reference to the given int64 and assigns it to the DiskTotal field.
func (o *ComputeSampleView) SetDiskTotal(v int64) {
o.DiskTotal = &v
}
// GetDiskUsed returns the DiskUsed field value if set, zero value otherwise.
func (o *ComputeSampleView) GetDiskUsed() int64 {
if o == nil || IsNil(o.DiskUsed) {
var ret int64
return ret
}
return *o.DiskUsed
}
// GetDiskUsedOk returns a tuple with the DiskUsed field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ComputeSampleView) GetDiskUsedOk() (*int64, bool) {
if o == nil || IsNil(o.DiskUsed) {
return nil, false
}
return o.DiskUsed, true
}
// HasDiskUsed returns a boolean if a field has been set.
func (o *ComputeSampleView) HasDiskUsed() bool {
if o != nil && !IsNil(o.DiskUsed) {
return true
}
return false
}
// SetDiskUsed gets a reference to the given int64 and assigns it to the DiskUsed field.
func (o *ComputeSampleView) SetDiskUsed(v int64) {
o.DiskUsed = &v
}
// GetDiskWrite returns the DiskWrite field value if set, zero value otherwise.
func (o *ComputeSampleView) GetDiskWrite() float64 {
if o == nil || IsNil(o.DiskWrite) {
var ret float64
return ret
}
return *o.DiskWrite
}
// GetDiskWriteOk returns a tuple with the DiskWrite field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ComputeSampleView) GetDiskWriteOk() (*float64, bool) {
if o == nil || IsNil(o.DiskWrite) {
return nil, false
}
return o.DiskWrite, true
}
// HasDiskWrite returns a boolean if a field has been set.
func (o *ComputeSampleView) HasDiskWrite() bool {
if o != nil && !IsNil(o.DiskWrite) {
return true
}
return false
}
// SetDiskWrite gets a reference to the given float64 and assigns it to the DiskWrite field.
func (o *ComputeSampleView) SetDiskWrite(v float64) {
o.DiskWrite = &v
}
// GetGpuMemTotal returns the GpuMemTotal field value if set, zero value otherwise.
func (o *ComputeSampleView) GetGpuMemTotal() int64 {
if o == nil || IsNil(o.GpuMemTotal) {
var ret int64
return ret
}
return *o.GpuMemTotal
}
// GetGpuMemTotalOk returns a tuple with the GpuMemTotal field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ComputeSampleView) GetGpuMemTotalOk() (*int64, bool) {
if o == nil || IsNil(o.GpuMemTotal) {
return nil, false
}
return o.GpuMemTotal, true
}
// HasGpuMemTotal returns a boolean if a field has been set.
func (o *ComputeSampleView) HasGpuMemTotal() bool {
if o != nil && !IsNil(o.GpuMemTotal) {
return true
}
return false
}
// SetGpuMemTotal gets a reference to the given int64 and assigns it to the GpuMemTotal field.
func (o *ComputeSampleView) SetGpuMemTotal(v int64) {
o.GpuMemTotal = &v
}
// GetGpuMemUsed returns the GpuMemUsed field value if set, zero value otherwise.
func (o *ComputeSampleView) GetGpuMemUsed() int64 {
if o == nil || IsNil(o.GpuMemUsed) {
var ret int64
return ret
}
return *o.GpuMemUsed
}
// GetGpuMemUsedOk returns a tuple with the GpuMemUsed field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ComputeSampleView) GetGpuMemUsedOk() (*int64, bool) {
if o == nil || IsNil(o.GpuMemUsed) {
return nil, false
}
return o.GpuMemUsed, true
}
// HasGpuMemUsed returns a boolean if a field has been set.
func (o *ComputeSampleView) HasGpuMemUsed() bool {
if o != nil && !IsNil(o.GpuMemUsed) {
return true
}
return false
}
// SetGpuMemUsed gets a reference to the given int64 and assigns it to the GpuMemUsed field.
func (o *ComputeSampleView) SetGpuMemUsed(v int64) {
o.GpuMemUsed = &v
}
// GetGpuModel returns the GpuModel field value if set, zero value otherwise.
func (o *ComputeSampleView) GetGpuModel() string {
if o == nil || IsNil(o.GpuModel) {
var ret string
return ret
}
return *o.GpuModel
}
// GetGpuModelOk returns a tuple with the GpuModel field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ComputeSampleView) GetGpuModelOk() (*string, bool) {
if o == nil || IsNil(o.GpuModel) {
return nil, false
}
return o.GpuModel, true
}
// HasGpuModel returns a boolean if a field has been set.
func (o *ComputeSampleView) HasGpuModel() bool {
if o != nil && !IsNil(o.GpuModel) {
return true
}
return false
}
// SetGpuModel gets a reference to the given string and assigns it to the GpuModel field.
func (o *ComputeSampleView) SetGpuModel(v string) {
o.GpuModel = &v
}
// GetGpuPower returns the GpuPower field value if set, zero value otherwise.
func (o *ComputeSampleView) GetGpuPower() float64 {
if o == nil || IsNil(o.GpuPower) {
var ret float64
return ret
}
return *o.GpuPower
}
// GetGpuPowerOk returns a tuple with the GpuPower field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ComputeSampleView) GetGpuPowerOk() (*float64, bool) {
if o == nil || IsNil(o.GpuPower) {
return nil, false
}
return o.GpuPower, true
}
// HasGpuPower returns a boolean if a field has been set.
func (o *ComputeSampleView) HasGpuPower() bool {
if o != nil && !IsNil(o.GpuPower) {
return true
}
return false
}
// SetGpuPower gets a reference to the given float64 and assigns it to the GpuPower field.
func (o *ComputeSampleView) SetGpuPower(v float64) {
o.GpuPower = &v
}
// GetGpuPowerLimit returns the GpuPowerLimit field value if set, zero value otherwise.
func (o *ComputeSampleView) GetGpuPowerLimit() float64 {
if o == nil || IsNil(o.GpuPowerLimit) {
var ret float64
return ret
}
return *o.GpuPowerLimit
}
// GetGpuPowerLimitOk returns a tuple with the GpuPowerLimit field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ComputeSampleView) GetGpuPowerLimitOk() (*float64, bool) {
if o == nil || IsNil(o.GpuPowerLimit) {
return nil, false
}
return o.GpuPowerLimit, true
}
// HasGpuPowerLimit returns a boolean if a field has been set.
func (o *ComputeSampleView) HasGpuPowerLimit() bool {
if o != nil && !IsNil(o.GpuPowerLimit) {
return true
}
return false
}
// SetGpuPowerLimit gets a reference to the given float64 and assigns it to the GpuPowerLimit field.
func (o *ComputeSampleView) SetGpuPowerLimit(v float64) {
o.GpuPowerLimit = &v
}
// GetGpuTemp returns the GpuTemp field value if set, zero value otherwise.
func (o *ComputeSampleView) GetGpuTemp() float64 {
if o == nil || IsNil(o.GpuTemp) {
var ret float64
return ret
}
return *o.GpuTemp
}
// GetGpuTempOk returns a tuple with the GpuTemp field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ComputeSampleView) GetGpuTempOk() (*float64, bool) {
if o == nil || IsNil(o.GpuTemp) {
return nil, false
}
return o.GpuTemp, true
}
// HasGpuTemp returns a boolean if a field has been set.
func (o *ComputeSampleView) HasGpuTemp() bool {
if o != nil && !IsNil(o.GpuTemp) {
return true
}
return false
}
// SetGpuTemp gets a reference to the given float64 and assigns it to the GpuTemp field.
func (o *ComputeSampleView) SetGpuTemp(v float64) {
o.GpuTemp = &v
}
// GetGpuUtil returns the GpuUtil field value if set, zero value otherwise.
func (o *ComputeSampleView) GetGpuUtil() float64 {
if o == nil || IsNil(o.GpuUtil) {
var ret float64
return ret
}
return *o.GpuUtil
}
// GetGpuUtilOk returns a tuple with the GpuUtil field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ComputeSampleView) GetGpuUtilOk() (*float64, bool) {
if o == nil || IsNil(o.GpuUtil) {
return nil, false
}
return o.GpuUtil, true
}
// HasGpuUtil returns a boolean if a field has been set.
func (o *ComputeSampleView) HasGpuUtil() bool {
if o != nil && !IsNil(o.GpuUtil) {
return true
}
return false
}
// SetGpuUtil gets a reference to the given float64 and assigns it to the GpuUtil field.
func (o *ComputeSampleView) SetGpuUtil(v float64) {
o.GpuUtil = &v
}
// GetGpus returns the Gpus field value if set, zero value otherwise.
func (o *ComputeSampleView) GetGpus() int64 {
if o == nil || IsNil(o.Gpus) {
var ret int64
return ret
}
return *o.Gpus
}
// GetGpusOk returns a tuple with the Gpus field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ComputeSampleView) GetGpusOk() (*int64, bool) {
if o == nil || IsNil(o.Gpus) {
return nil, false
}
return o.Gpus, true
}
// HasGpus returns a boolean if a field has been set.
func (o *ComputeSampleView) HasGpus() bool {
if o != nil && !IsNil(o.Gpus) {
return true
}
return false
}
// SetGpus gets a reference to the given int64 and assigns it to the Gpus field.
func (o *ComputeSampleView) SetGpus(v int64) {
o.Gpus = &v
}
// GetHost returns the Host field value if set, zero value otherwise.
func (o *ComputeSampleView) GetHost() string {
if o == nil || IsNil(o.Host) {
var ret string
return ret
}
return *o.Host
}
// GetHostOk returns a tuple with the Host field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ComputeSampleView) GetHostOk() (*string, bool) {
if o == nil || IsNil(o.Host) {
return nil, false
}
return o.Host, true
}
// HasHost returns a boolean if a field has been set.
func (o *ComputeSampleView) HasHost() bool {
if o != nil && !IsNil(o.Host) {
return true
}
return false
}
// SetHost gets a reference to the given string and assigns it to the Host field.
func (o *ComputeSampleView) SetHost(v string) {
o.Host = &v
}
// GetKind returns the Kind field value if set, zero value otherwise.
func (o *ComputeSampleView) GetKind() string {
if o == nil || IsNil(o.Kind) {
var ret string
return ret
}
return *o.Kind
}
// GetKindOk returns a tuple with the Kind field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ComputeSampleView) GetKindOk() (*string, bool) {
if o == nil || IsNil(o.Kind) {
return nil, false
}
return o.Kind, true
}
// HasKind returns a boolean if a field has been set.
func (o *ComputeSampleView) HasKind() bool {
if o != nil && !IsNil(o.Kind) {
return true
}
return false
}
// SetKind gets a reference to the given string and assigns it to the Kind field.
func (o *ComputeSampleView) SetKind(v string) {
o.Kind = &v
}
// GetKvCache returns the KvCache field value if set, zero value otherwise.
func (o *ComputeSampleView) GetKvCache() float64 {
if o == nil || IsNil(o.KvCache) {
var ret float64
return ret
}
return *o.KvCache
}
// GetKvCacheOk returns a tuple with the KvCache field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ComputeSampleView) GetKvCacheOk() (*float64, bool) {
if o == nil || IsNil(o.KvCache) {
return nil, false
}
return o.KvCache, true
}
// HasKvCache returns a boolean if a field has been set.
func (o *ComputeSampleView) HasKvCache() bool {
if o != nil && !IsNil(o.KvCache) {
return true
}
return false
}
// SetKvCache gets a reference to the given float64 and assigns it to the KvCache field.
func (o *ComputeSampleView) SetKvCache(v float64) {
o.KvCache = &v
}
// GetLoad1 returns the Load1 field value if set, zero value otherwise.
func (o *ComputeSampleView) GetLoad1() float64 {
if o == nil || IsNil(o.Load1) {
var ret float64
return ret
}
return *o.Load1
}
// GetLoad1Ok returns a tuple with the Load1 field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ComputeSampleView) GetLoad1Ok() (*float64, bool) {
if o == nil || IsNil(o.Load1) {
return nil, false
}
return o.Load1, true
}
// HasLoad1 returns a boolean if a field has been set.
func (o *ComputeSampleView) HasLoad1() bool {
if o != nil && !IsNil(o.Load1) {
return true
}
return false
}
// SetLoad1 gets a reference to the given float64 and assigns it to the Load1 field.
func (o *ComputeSampleView) SetLoad1(v float64) {
o.Load1 = &v
}
// GetLoad15 returns the Load15 field value if set, zero value otherwise.
func (o *ComputeSampleView) GetLoad15() float64 {
if o == nil || IsNil(o.Load15) {
var ret float64
return ret
}
return *o.Load15
}
// GetLoad15Ok returns a tuple with the Load15 field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ComputeSampleView) GetLoad15Ok() (*float64, bool) {
if o == nil || IsNil(o.Load15) {
return nil, false
}
return o.Load15, true
}
// HasLoad15 returns a boolean if a field has been set.
func (o *ComputeSampleView) HasLoad15() bool {
if o != nil && !IsNil(o.Load15) {
return true
}
return false
}
// SetLoad15 gets a reference to the given float64 and assigns it to the Load15 field.
func (o *ComputeSampleView) SetLoad15(v float64) {
o.Load15 = &v
}
// GetLoad5 returns the Load5 field value if set, zero value otherwise.
func (o *ComputeSampleView) GetLoad5() float64 {
if o == nil || IsNil(o.Load5) {
var ret float64
return ret
}
return *o.Load5
}
// GetLoad5Ok returns a tuple with the Load5 field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ComputeSampleView) GetLoad5Ok() (*float64, bool) {
if o == nil || IsNil(o.Load5) {
return nil, false
}
return o.Load5, true
}
// HasLoad5 returns a boolean if a field has been set.
func (o *ComputeSampleView) HasLoad5() bool {
if o != nil && !IsNil(o.Load5) {
return true
}
return false
}
// SetLoad5 gets a reference to the given float64 and assigns it to the Load5 field.
func (o *ComputeSampleView) SetLoad5(v float64) {
o.Load5 = &v
}
// GetMemFree returns the MemFree field value if set, zero value otherwise.
func (o *ComputeSampleView) GetMemFree() int64 {
if o == nil || IsNil(o.MemFree) {
var ret int64
return ret
}
return *o.MemFree
}
// GetMemFreeOk returns a tuple with the MemFree field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ComputeSampleView) GetMemFreeOk() (*int64, bool) {
if o == nil || IsNil(o.MemFree) {
return nil, false
}
return o.MemFree, true
}
// HasMemFree returns a boolean if a field has been set.
func (o *ComputeSampleView) HasMemFree() bool {
if o != nil && !IsNil(o.MemFree) {
return true
}
return false
}
// SetMemFree gets a reference to the given int64 and assigns it to the MemFree field.
func (o *ComputeSampleView) SetMemFree(v int64) {
o.MemFree = &v
}
// GetMemUsed returns the MemUsed field value if set, zero value otherwise.
func (o *ComputeSampleView) GetMemUsed() int64 {
if o == nil || IsNil(o.MemUsed) {
var ret int64
return ret
}
return *o.MemUsed
}
// GetMemUsedOk returns a tuple with the MemUsed field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ComputeSampleView) GetMemUsedOk() (*int64, bool) {
if o == nil || IsNil(o.MemUsed) {
return nil, false
}
return o.MemUsed, true
}
// HasMemUsed returns a boolean if a field has been set.
func (o *ComputeSampleView) HasMemUsed() bool {
if o != nil && !IsNil(o.MemUsed) {
return true
}
return false
}
// SetMemUsed gets a reference to the given int64 and assigns it to the MemUsed field.
func (o *ComputeSampleView) SetMemUsed(v int64) {
o.MemUsed = &v
}
// GetMemory returns the Memory field value if set, zero value otherwise.
func (o *ComputeSampleView) 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 *ComputeSampleView) 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 *ComputeSampleView) 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 *ComputeSampleView) SetMemory(v int64) {
o.Memory = &v
}
// GetModel returns the Model field value if set, zero value otherwise.
func (o *ComputeSampleView) 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 *ComputeSampleView) 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 *ComputeSampleView) 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 *ComputeSampleView) SetModel(v string) {
o.Model = &v
}
// GetNetRx returns the NetRx field value if set, zero value otherwise.
func (o *ComputeSampleView) GetNetRx() float64 {
if o == nil || IsNil(o.NetRx) {
var ret float64
return ret
}
return *o.NetRx
}
// GetNetRxOk returns a tuple with the NetRx field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ComputeSampleView) GetNetRxOk() (*float64, bool) {
if o == nil || IsNil(o.NetRx) {
return nil, false
}
return o.NetRx, true
}
// HasNetRx returns a boolean if a field has been set.
func (o *ComputeSampleView) HasNetRx() bool {
if o != nil && !IsNil(o.NetRx) {
return true
}
return false
}
// SetNetRx gets a reference to the given float64 and assigns it to the NetRx field.
func (o *ComputeSampleView) SetNetRx(v float64) {
o.NetRx = &v
}
// GetNetTx returns the NetTx field value if set, zero value otherwise.
func (o *ComputeSampleView) GetNetTx() float64 {
if o == nil || IsNil(o.NetTx) {
var ret float64
return ret
}
return *o.NetTx
}
// GetNetTxOk returns a tuple with the NetTx field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ComputeSampleView) GetNetTxOk() (*float64, bool) {
if o == nil || IsNil(o.NetTx) {
return nil, false
}
return o.NetTx, true
}
// HasNetTx returns a boolean if a field has been set.
func (o *ComputeSampleView) HasNetTx() bool {
if o != nil && !IsNil(o.NetTx) {
return true
}
return false
}
// SetNetTx gets a reference to the given float64 and assigns it to the NetTx field.
func (o *ComputeSampleView) SetNetTx(v float64) {
o.NetTx = &v
}
// GetPrefill returns the Prefill field value if set, zero value otherwise.
func (o *ComputeSampleView) GetPrefill() float64 {
if o == nil || IsNil(o.Prefill) {
var ret float64
return ret
}
return *o.Prefill
}
// GetPrefillOk returns a tuple with the Prefill field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ComputeSampleView) GetPrefillOk() (*float64, bool) {
if o == nil || IsNil(o.Prefill) {
return nil, false
}
return o.Prefill, true
}
// HasPrefill returns a boolean if a field has been set.
func (o *ComputeSampleView) HasPrefill() bool {
if o != nil && !IsNil(o.Prefill) {
return true
}
return false
}
// SetPrefill gets a reference to the given float64 and assigns it to the Prefill field.
func (o *ComputeSampleView) SetPrefill(v float64) {
o.Prefill = &v
}
// GetRunning returns the Running field value if set, zero value otherwise.
func (o *ComputeSampleView) GetRunning() int64 {
if o == nil || IsNil(o.Running) {
var ret int64
return ret
}
return *o.Running
}
// GetRunningOk returns a tuple with the Running field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ComputeSampleView) GetRunningOk() (*int64, bool) {
if o == nil || IsNil(o.Running) {
return nil, false
}
return o.Running, true
}
// HasRunning returns a boolean if a field has been set.
func (o *ComputeSampleView) HasRunning() bool {
if o != nil && !IsNil(o.Running) {
return true
}
return false
}
// SetRunning gets a reference to the given int64 and assigns it to the Running field.
func (o *ComputeSampleView) SetRunning(v int64) {
o.Running = &v
}
// GetSource returns the Source field value if set, zero value otherwise.
func (o *ComputeSampleView) GetSource() string {
if o == nil || IsNil(o.Source) {
var ret string
return ret
}
return *o.Source
}
// GetSourceOk returns a tuple with the Source field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ComputeSampleView) GetSourceOk() (*string, bool) {
if o == nil || IsNil(o.Source) {
return nil, false
}
return o.Source, true
}
// HasSource returns a boolean if a field has been set.
func (o *ComputeSampleView) HasSource() bool {
if o != nil && !IsNil(o.Source) {
return true
}
return false
}
// SetSource gets a reference to the given string and assigns it to the Source field.
func (o *ComputeSampleView) SetSource(v string) {
o.Source = &v
}
// GetTtft returns the Ttft field value if set, zero value otherwise.
func (o *ComputeSampleView) GetTtft() float64 {
if o == nil || IsNil(o.Ttft) {
var ret float64
return ret
}
return *o.Ttft
}
// GetTtftOk returns a tuple with the Ttft field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ComputeSampleView) GetTtftOk() (*float64, bool) {
if o == nil || IsNil(o.Ttft) {
return nil, false
}
return o.Ttft, true
}
// HasTtft returns a boolean if a field has been set.
func (o *ComputeSampleView) HasTtft() bool {
if o != nil && !IsNil(o.Ttft) {
return true
}
return false
}
// SetTtft gets a reference to the given float64 and assigns it to the Ttft field.
func (o *ComputeSampleView) SetTtft(v float64) {
o.Ttft = &v
}
// GetUnit returns the Unit field value if set, zero value otherwise.
func (o *ComputeSampleView) GetUnit() string {
if o == nil || IsNil(o.Unit) {
var ret string
return ret
}
return *o.Unit
}
// GetUnitOk returns a tuple with the Unit field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ComputeSampleView) GetUnitOk() (*string, bool) {
if o == nil || IsNil(o.Unit) {
return nil, false
}
return o.Unit, true
}
// HasUnit returns a boolean if a field has been set.
func (o *ComputeSampleView) HasUnit() bool {
if o != nil && !IsNil(o.Unit) {
return true
}
return false
}
// SetUnit gets a reference to the given string and assigns it to the Unit field.
func (o *ComputeSampleView) SetUnit(v string) {
o.Unit = &v
}
// GetWaiting returns the Waiting field value if set, zero value otherwise.
func (o *ComputeSampleView) GetWaiting() int64 {
if o == nil || IsNil(o.Waiting) {
var ret int64
return ret
}
return *o.Waiting
}
// GetWaitingOk returns a tuple with the Waiting field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ComputeSampleView) GetWaitingOk() (*int64, bool) {
if o == nil || IsNil(o.Waiting) {
return nil, false
}
return o.Waiting, true
}
// HasWaiting returns a boolean if a field has been set.
func (o *ComputeSampleView) HasWaiting() bool {
if o != nil && !IsNil(o.Waiting) {
return true
}
return false
}
// SetWaiting gets a reference to the given int64 and assigns it to the Waiting field.
func (o *ComputeSampleView) SetWaiting(v int64) {
o.Waiting = &v
}
func (o ComputeSampleView) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o ComputeSampleView) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.At) {
toSerialize["at"] = o.At
}
if !IsNil(o.CostCents) {
toSerialize["costCents"] = o.CostCents
}
if !IsNil(o.CpuTemp) {
toSerialize["cpuTemp"] = o.CpuTemp
}
if !IsNil(o.CpuUtil) {
toSerialize["cpuUtil"] = o.CpuUtil
}
if !IsNil(o.Cpus) {
toSerialize["cpus"] = o.Cpus
}
if !IsNil(o.Decode) {
toSerialize["decode"] = o.Decode
}
if !IsNil(o.DiskRead) {
toSerialize["diskRead"] = o.DiskRead
}
if !IsNil(o.DiskTotal) {
toSerialize["diskTotal"] = o.DiskTotal
}
if !IsNil(o.DiskUsed) {
toSerialize["diskUsed"] = o.DiskUsed
}
if !IsNil(o.DiskWrite) {
toSerialize["diskWrite"] = o.DiskWrite
}
if !IsNil(o.GpuMemTotal) {
toSerialize["gpuMemTotal"] = o.GpuMemTotal
}
if !IsNil(o.GpuMemUsed) {
toSerialize["gpuMemUsed"] = o.GpuMemUsed
}
if !IsNil(o.GpuModel) {
toSerialize["gpuModel"] = o.GpuModel
}
if !IsNil(o.GpuPower) {
toSerialize["gpuPower"] = o.GpuPower
}
if !IsNil(o.GpuPowerLimit) {
toSerialize["gpuPowerLimit"] = o.GpuPowerLimit
}
if !IsNil(o.GpuTemp) {
toSerialize["gpuTemp"] = o.GpuTemp
}
if !IsNil(o.GpuUtil) {
toSerialize["gpuUtil"] = o.GpuUtil
}
if !IsNil(o.Gpus) {
toSerialize["gpus"] = o.Gpus
}
if !IsNil(o.Host) {
toSerialize["host"] = o.Host
}
if !IsNil(o.Kind) {
toSerialize["kind"] = o.Kind
}
if !IsNil(o.KvCache) {
toSerialize["kvCache"] = o.KvCache
}
if !IsNil(o.Load1) {
toSerialize["load1"] = o.Load1
}
if !IsNil(o.Load15) {
toSerialize["load15"] = o.Load15
}
if !IsNil(o.Load5) {
toSerialize["load5"] = o.Load5
}
if !IsNil(o.MemFree) {
toSerialize["memFree"] = o.MemFree
}
if !IsNil(o.MemUsed) {
toSerialize["memUsed"] = o.MemUsed
}
if !IsNil(o.Memory) {
toSerialize["memory"] = o.Memory
}
if !IsNil(o.Model) {
toSerialize["model"] = o.Model
}
if !IsNil(o.NetRx) {
toSerialize["netRx"] = o.NetRx
}
if !IsNil(o.NetTx) {
toSerialize["netTx"] = o.NetTx
}
if !IsNil(o.Prefill) {
toSerialize["prefill"] = o.Prefill
}
if !IsNil(o.Running) {
toSerialize["running"] = o.Running
}
if !IsNil(o.Source) {
toSerialize["source"] = o.Source
}
if !IsNil(o.Ttft) {
toSerialize["ttft"] = o.Ttft
}
if !IsNil(o.Unit) {
toSerialize["unit"] = o.Unit
}
if !IsNil(o.Waiting) {
toSerialize["waiting"] = o.Waiting
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *ComputeSampleView) UnmarshalJSON(data []byte) (err error) {
varComputeSampleView := _ComputeSampleView{}
err = json.Unmarshal(data, &varComputeSampleView)
if err != nil {
return err
}
*o = ComputeSampleView(varComputeSampleView)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "at")
delete(additionalProperties, "costCents")
delete(additionalProperties, "cpuTemp")
delete(additionalProperties, "cpuUtil")
delete(additionalProperties, "cpus")
delete(additionalProperties, "decode")
delete(additionalProperties, "diskRead")
delete(additionalProperties, "diskTotal")
delete(additionalProperties, "diskUsed")
delete(additionalProperties, "diskWrite")
delete(additionalProperties, "gpuMemTotal")
delete(additionalProperties, "gpuMemUsed")
delete(additionalProperties, "gpuModel")
delete(additionalProperties, "gpuPower")
delete(additionalProperties, "gpuPowerLimit")
delete(additionalProperties, "gpuTemp")
delete(additionalProperties, "gpuUtil")
delete(additionalProperties, "gpus")
delete(additionalProperties, "host")
delete(additionalProperties, "kind")
delete(additionalProperties, "kvCache")
delete(additionalProperties, "load1")
delete(additionalProperties, "load15")
delete(additionalProperties, "load5")
delete(additionalProperties, "memFree")
delete(additionalProperties, "memUsed")
delete(additionalProperties, "memory")
delete(additionalProperties, "model")
delete(additionalProperties, "netRx")
delete(additionalProperties, "netTx")
delete(additionalProperties, "prefill")
delete(additionalProperties, "running")
delete(additionalProperties, "source")
delete(additionalProperties, "ttft")
delete(additionalProperties, "unit")
delete(additionalProperties, "waiting")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableComputeSampleView struct {
value *ComputeSampleView
isSet bool
}
func (v NullableComputeSampleView) Get() *ComputeSampleView {
return v.value
}
func (v *NullableComputeSampleView) Set(val *ComputeSampleView) {
v.value = val
v.isSet = true
}
func (v NullableComputeSampleView) IsSet() bool {
return v.isSet
}
func (v *NullableComputeSampleView) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableComputeSampleView(val *ComputeSampleView) *NullableComputeSampleView {
return &NullableComputeSampleView{value: val, isSet: true}
}
func (v NullableComputeSampleView) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableComputeSampleView) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}