mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
155 lines
4.2 KiB
Go
155 lines
4.2 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 ComputeGpuAlertList type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &ComputeGpuAlertList{}
|
|
|
|
// ComputeGpuAlertList struct for ComputeGpuAlertList
|
|
type ComputeGpuAlertList struct {
|
|
// Alerts is always empty, and typed as a raw list because Visor exposes no alert inventory for this surface to shape: there is nothing to describe until there is something to return.
|
|
Alerts []interface{} `json:"alerts,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _ComputeGpuAlertList ComputeGpuAlertList
|
|
|
|
// NewComputeGpuAlertList instantiates a new ComputeGpuAlertList 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 NewComputeGpuAlertList() *ComputeGpuAlertList {
|
|
this := ComputeGpuAlertList{}
|
|
return &this
|
|
}
|
|
|
|
// NewComputeGpuAlertListWithDefaults instantiates a new ComputeGpuAlertList 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 NewComputeGpuAlertListWithDefaults() *ComputeGpuAlertList {
|
|
this := ComputeGpuAlertList{}
|
|
return &this
|
|
}
|
|
|
|
// GetAlerts returns the Alerts field value if set, zero value otherwise.
|
|
func (o *ComputeGpuAlertList) GetAlerts() []interface{} {
|
|
if o == nil || IsNil(o.Alerts) {
|
|
var ret []interface{}
|
|
return ret
|
|
}
|
|
return o.Alerts
|
|
}
|
|
|
|
// GetAlertsOk returns a tuple with the Alerts field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ComputeGpuAlertList) GetAlertsOk() ([]interface{}, bool) {
|
|
if o == nil || IsNil(o.Alerts) {
|
|
return nil, false
|
|
}
|
|
return o.Alerts, true
|
|
}
|
|
|
|
// HasAlerts returns a boolean if a field has been set.
|
|
func (o *ComputeGpuAlertList) HasAlerts() bool {
|
|
if o != nil && !IsNil(o.Alerts) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetAlerts gets a reference to the given []interface{} and assigns it to the Alerts field.
|
|
func (o *ComputeGpuAlertList) SetAlerts(v []interface{}) {
|
|
o.Alerts = v
|
|
}
|
|
|
|
func (o ComputeGpuAlertList) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o ComputeGpuAlertList) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Alerts) {
|
|
toSerialize["alerts"] = o.Alerts
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *ComputeGpuAlertList) UnmarshalJSON(data []byte) (err error) {
|
|
varComputeGpuAlertList := _ComputeGpuAlertList{}
|
|
|
|
err = json.Unmarshal(data, &varComputeGpuAlertList)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = ComputeGpuAlertList(varComputeGpuAlertList)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "alerts")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableComputeGpuAlertList struct {
|
|
value *ComputeGpuAlertList
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableComputeGpuAlertList) Get() *ComputeGpuAlertList {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableComputeGpuAlertList) Set(val *ComputeGpuAlertList) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableComputeGpuAlertList) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableComputeGpuAlertList) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableComputeGpuAlertList(val *ComputeGpuAlertList) *NullableComputeGpuAlertList {
|
|
return &NullableComputeGpuAlertList{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableComputeGpuAlertList) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableComputeGpuAlertList) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|