mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
269 lines
6.6 KiB
Go
269 lines
6.6 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 EvalBoardRange type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &EvalBoardRange{}
|
|
|
|
// EvalBoardRange struct for EvalBoardRange
|
|
type EvalBoardRange struct {
|
|
// RFC3339 (UTC)
|
|
End *string `json:"end,omitempty"`
|
|
// hour | day
|
|
Interval *string `json:"interval,omitempty"`
|
|
// echoed label (24h | 7d | 30d | custom)
|
|
Range *string `json:"range,omitempty"`
|
|
// RFC3339 (UTC)
|
|
Start *string `json:"start,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _EvalBoardRange EvalBoardRange
|
|
|
|
// NewEvalBoardRange instantiates a new EvalBoardRange 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 NewEvalBoardRange() *EvalBoardRange {
|
|
this := EvalBoardRange{}
|
|
return &this
|
|
}
|
|
|
|
// NewEvalBoardRangeWithDefaults instantiates a new EvalBoardRange 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 NewEvalBoardRangeWithDefaults() *EvalBoardRange {
|
|
this := EvalBoardRange{}
|
|
return &this
|
|
}
|
|
|
|
// GetEnd returns the End field value if set, zero value otherwise.
|
|
func (o *EvalBoardRange) GetEnd() string {
|
|
if o == nil || IsNil(o.End) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.End
|
|
}
|
|
|
|
// GetEndOk returns a tuple with the End field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *EvalBoardRange) GetEndOk() (*string, bool) {
|
|
if o == nil || IsNil(o.End) {
|
|
return nil, false
|
|
}
|
|
return o.End, true
|
|
}
|
|
|
|
// HasEnd returns a boolean if a field has been set.
|
|
func (o *EvalBoardRange) HasEnd() bool {
|
|
if o != nil && !IsNil(o.End) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetEnd gets a reference to the given string and assigns it to the End field.
|
|
func (o *EvalBoardRange) SetEnd(v string) {
|
|
o.End = &v
|
|
}
|
|
|
|
// GetInterval returns the Interval field value if set, zero value otherwise.
|
|
func (o *EvalBoardRange) GetInterval() string {
|
|
if o == nil || IsNil(o.Interval) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Interval
|
|
}
|
|
|
|
// GetIntervalOk returns a tuple with the Interval field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *EvalBoardRange) GetIntervalOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Interval) {
|
|
return nil, false
|
|
}
|
|
return o.Interval, true
|
|
}
|
|
|
|
// HasInterval returns a boolean if a field has been set.
|
|
func (o *EvalBoardRange) HasInterval() bool {
|
|
if o != nil && !IsNil(o.Interval) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetInterval gets a reference to the given string and assigns it to the Interval field.
|
|
func (o *EvalBoardRange) SetInterval(v string) {
|
|
o.Interval = &v
|
|
}
|
|
|
|
// GetRange returns the Range field value if set, zero value otherwise.
|
|
func (o *EvalBoardRange) GetRange() string {
|
|
if o == nil || IsNil(o.Range) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Range
|
|
}
|
|
|
|
// GetRangeOk returns a tuple with the Range field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *EvalBoardRange) GetRangeOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Range) {
|
|
return nil, false
|
|
}
|
|
return o.Range, true
|
|
}
|
|
|
|
// HasRange returns a boolean if a field has been set.
|
|
func (o *EvalBoardRange) HasRange() bool {
|
|
if o != nil && !IsNil(o.Range) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetRange gets a reference to the given string and assigns it to the Range field.
|
|
func (o *EvalBoardRange) SetRange(v string) {
|
|
o.Range = &v
|
|
}
|
|
|
|
// GetStart returns the Start field value if set, zero value otherwise.
|
|
func (o *EvalBoardRange) GetStart() string {
|
|
if o == nil || IsNil(o.Start) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Start
|
|
}
|
|
|
|
// GetStartOk returns a tuple with the Start field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *EvalBoardRange) GetStartOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Start) {
|
|
return nil, false
|
|
}
|
|
return o.Start, true
|
|
}
|
|
|
|
// HasStart returns a boolean if a field has been set.
|
|
func (o *EvalBoardRange) HasStart() bool {
|
|
if o != nil && !IsNil(o.Start) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetStart gets a reference to the given string and assigns it to the Start field.
|
|
func (o *EvalBoardRange) SetStart(v string) {
|
|
o.Start = &v
|
|
}
|
|
|
|
func (o EvalBoardRange) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o EvalBoardRange) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.End) {
|
|
toSerialize["end"] = o.End
|
|
}
|
|
if !IsNil(o.Interval) {
|
|
toSerialize["interval"] = o.Interval
|
|
}
|
|
if !IsNil(o.Range) {
|
|
toSerialize["range"] = o.Range
|
|
}
|
|
if !IsNil(o.Start) {
|
|
toSerialize["start"] = o.Start
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *EvalBoardRange) UnmarshalJSON(data []byte) (err error) {
|
|
varEvalBoardRange := _EvalBoardRange{}
|
|
|
|
err = json.Unmarshal(data, &varEvalBoardRange)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = EvalBoardRange(varEvalBoardRange)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "end")
|
|
delete(additionalProperties, "interval")
|
|
delete(additionalProperties, "range")
|
|
delete(additionalProperties, "start")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableEvalBoardRange struct {
|
|
value *EvalBoardRange
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableEvalBoardRange) Get() *EvalBoardRange {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableEvalBoardRange) Set(val *EvalBoardRange) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableEvalBoardRange) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableEvalBoardRange) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableEvalBoardRange(val *EvalBoardRange) *NullableEvalBoardRange {
|
|
return &NullableEvalBoardRange{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableEvalBoardRange) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableEvalBoardRange) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|