mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
422 lines
10 KiB
Go
422 lines
10 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"
|
|
"time"
|
|
)
|
|
|
|
// checks if the BenchmarkPreset type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &BenchmarkPreset{}
|
|
|
|
// BenchmarkPreset struct for BenchmarkPreset
|
|
type BenchmarkPreset struct {
|
|
// the blend — model ids from the arena
|
|
Arms []string `json:"arms,omitempty"`
|
|
// At is when this version was stored. Set by the server; a value sent is not read. Zero on the reference blend.
|
|
At *time.Time `json:"at,omitempty"`
|
|
// By is the verified user who stored it. Set by the server; a value sent is not read.
|
|
By *string `json:"by,omitempty"`
|
|
// the part after enso-: lowercase letters, digits and inner hyphens, at most 64
|
|
Name *string `json:"name,omitempty"`
|
|
// why this blend (audit)
|
|
Note *string `json:"note,omitempty"`
|
|
// the org the blend belongs to: the writer's verified org, never a value sent
|
|
Owner *string `json:"owner,omitempty"`
|
|
// fan-out width (>=1)
|
|
Panel *int64 `json:"panel,omitempty"`
|
|
// escalation order over arms
|
|
Rank []string `json:"rank,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _BenchmarkPreset BenchmarkPreset
|
|
|
|
// NewBenchmarkPreset instantiates a new BenchmarkPreset 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 NewBenchmarkPreset() *BenchmarkPreset {
|
|
this := BenchmarkPreset{}
|
|
return &this
|
|
}
|
|
|
|
// NewBenchmarkPresetWithDefaults instantiates a new BenchmarkPreset 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 NewBenchmarkPresetWithDefaults() *BenchmarkPreset {
|
|
this := BenchmarkPreset{}
|
|
return &this
|
|
}
|
|
|
|
// GetArms returns the Arms field value if set, zero value otherwise.
|
|
func (o *BenchmarkPreset) GetArms() []string {
|
|
if o == nil || IsNil(o.Arms) {
|
|
var ret []string
|
|
return ret
|
|
}
|
|
return o.Arms
|
|
}
|
|
|
|
// GetArmsOk returns a tuple with the Arms field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *BenchmarkPreset) GetArmsOk() ([]string, bool) {
|
|
if o == nil || IsNil(o.Arms) {
|
|
return nil, false
|
|
}
|
|
return o.Arms, true
|
|
}
|
|
|
|
// HasArms returns a boolean if a field has been set.
|
|
func (o *BenchmarkPreset) HasArms() bool {
|
|
if o != nil && !IsNil(o.Arms) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetArms gets a reference to the given []string and assigns it to the Arms field.
|
|
func (o *BenchmarkPreset) SetArms(v []string) {
|
|
o.Arms = v
|
|
}
|
|
|
|
// GetAt returns the At field value if set, zero value otherwise.
|
|
func (o *BenchmarkPreset) GetAt() time.Time {
|
|
if o == nil || IsNil(o.At) {
|
|
var ret time.Time
|
|
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 *BenchmarkPreset) GetAtOk() (*time.Time, 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 *BenchmarkPreset) HasAt() bool {
|
|
if o != nil && !IsNil(o.At) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetAt gets a reference to the given time.Time and assigns it to the At field.
|
|
func (o *BenchmarkPreset) SetAt(v time.Time) {
|
|
o.At = &v
|
|
}
|
|
|
|
// GetBy returns the By field value if set, zero value otherwise.
|
|
func (o *BenchmarkPreset) GetBy() string {
|
|
if o == nil || IsNil(o.By) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.By
|
|
}
|
|
|
|
// GetByOk returns a tuple with the By field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *BenchmarkPreset) GetByOk() (*string, bool) {
|
|
if o == nil || IsNil(o.By) {
|
|
return nil, false
|
|
}
|
|
return o.By, true
|
|
}
|
|
|
|
// HasBy returns a boolean if a field has been set.
|
|
func (o *BenchmarkPreset) HasBy() bool {
|
|
if o != nil && !IsNil(o.By) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetBy gets a reference to the given string and assigns it to the By field.
|
|
func (o *BenchmarkPreset) SetBy(v string) {
|
|
o.By = &v
|
|
}
|
|
|
|
// GetName returns the Name field value if set, zero value otherwise.
|
|
func (o *BenchmarkPreset) 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 *BenchmarkPreset) 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 *BenchmarkPreset) 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 *BenchmarkPreset) SetName(v string) {
|
|
o.Name = &v
|
|
}
|
|
|
|
// GetNote returns the Note field value if set, zero value otherwise.
|
|
func (o *BenchmarkPreset) GetNote() string {
|
|
if o == nil || IsNil(o.Note) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Note
|
|
}
|
|
|
|
// GetNoteOk returns a tuple with the Note field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *BenchmarkPreset) GetNoteOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Note) {
|
|
return nil, false
|
|
}
|
|
return o.Note, true
|
|
}
|
|
|
|
// HasNote returns a boolean if a field has been set.
|
|
func (o *BenchmarkPreset) HasNote() bool {
|
|
if o != nil && !IsNil(o.Note) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetNote gets a reference to the given string and assigns it to the Note field.
|
|
func (o *BenchmarkPreset) SetNote(v string) {
|
|
o.Note = &v
|
|
}
|
|
|
|
// GetOwner returns the Owner field value if set, zero value otherwise.
|
|
func (o *BenchmarkPreset) GetOwner() string {
|
|
if o == nil || IsNil(o.Owner) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Owner
|
|
}
|
|
|
|
// GetOwnerOk returns a tuple with the Owner field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *BenchmarkPreset) GetOwnerOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Owner) {
|
|
return nil, false
|
|
}
|
|
return o.Owner, true
|
|
}
|
|
|
|
// HasOwner returns a boolean if a field has been set.
|
|
func (o *BenchmarkPreset) HasOwner() bool {
|
|
if o != nil && !IsNil(o.Owner) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetOwner gets a reference to the given string and assigns it to the Owner field.
|
|
func (o *BenchmarkPreset) SetOwner(v string) {
|
|
o.Owner = &v
|
|
}
|
|
|
|
// GetPanel returns the Panel field value if set, zero value otherwise.
|
|
func (o *BenchmarkPreset) GetPanel() int64 {
|
|
if o == nil || IsNil(o.Panel) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.Panel
|
|
}
|
|
|
|
// GetPanelOk returns a tuple with the Panel field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *BenchmarkPreset) GetPanelOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.Panel) {
|
|
return nil, false
|
|
}
|
|
return o.Panel, true
|
|
}
|
|
|
|
// HasPanel returns a boolean if a field has been set.
|
|
func (o *BenchmarkPreset) HasPanel() bool {
|
|
if o != nil && !IsNil(o.Panel) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetPanel gets a reference to the given int64 and assigns it to the Panel field.
|
|
func (o *BenchmarkPreset) SetPanel(v int64) {
|
|
o.Panel = &v
|
|
}
|
|
|
|
// GetRank returns the Rank field value if set, zero value otherwise.
|
|
func (o *BenchmarkPreset) GetRank() []string {
|
|
if o == nil || IsNil(o.Rank) {
|
|
var ret []string
|
|
return ret
|
|
}
|
|
return o.Rank
|
|
}
|
|
|
|
// GetRankOk returns a tuple with the Rank field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *BenchmarkPreset) GetRankOk() ([]string, bool) {
|
|
if o == nil || IsNil(o.Rank) {
|
|
return nil, false
|
|
}
|
|
return o.Rank, true
|
|
}
|
|
|
|
// HasRank returns a boolean if a field has been set.
|
|
func (o *BenchmarkPreset) HasRank() bool {
|
|
if o != nil && !IsNil(o.Rank) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetRank gets a reference to the given []string and assigns it to the Rank field.
|
|
func (o *BenchmarkPreset) SetRank(v []string) {
|
|
o.Rank = v
|
|
}
|
|
|
|
func (o BenchmarkPreset) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o BenchmarkPreset) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Arms) {
|
|
toSerialize["arms"] = o.Arms
|
|
}
|
|
if !IsNil(o.At) {
|
|
toSerialize["at"] = o.At
|
|
}
|
|
if !IsNil(o.By) {
|
|
toSerialize["by"] = o.By
|
|
}
|
|
if !IsNil(o.Name) {
|
|
toSerialize["name"] = o.Name
|
|
}
|
|
if !IsNil(o.Note) {
|
|
toSerialize["note"] = o.Note
|
|
}
|
|
if !IsNil(o.Owner) {
|
|
toSerialize["owner"] = o.Owner
|
|
}
|
|
if !IsNil(o.Panel) {
|
|
toSerialize["panel"] = o.Panel
|
|
}
|
|
if !IsNil(o.Rank) {
|
|
toSerialize["rank"] = o.Rank
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *BenchmarkPreset) UnmarshalJSON(data []byte) (err error) {
|
|
varBenchmarkPreset := _BenchmarkPreset{}
|
|
|
|
err = json.Unmarshal(data, &varBenchmarkPreset)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = BenchmarkPreset(varBenchmarkPreset)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "arms")
|
|
delete(additionalProperties, "at")
|
|
delete(additionalProperties, "by")
|
|
delete(additionalProperties, "name")
|
|
delete(additionalProperties, "note")
|
|
delete(additionalProperties, "owner")
|
|
delete(additionalProperties, "panel")
|
|
delete(additionalProperties, "rank")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableBenchmarkPreset struct {
|
|
value *BenchmarkPreset
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableBenchmarkPreset) Get() *BenchmarkPreset {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableBenchmarkPreset) Set(val *BenchmarkPreset) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableBenchmarkPreset) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableBenchmarkPreset) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableBenchmarkPreset(val *BenchmarkPreset) *NullableBenchmarkPreset {
|
|
return &NullableBenchmarkPreset{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableBenchmarkPreset) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableBenchmarkPreset) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|