mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
228 lines
5.6 KiB
Go
228 lines
5.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 AiStatsWindow type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &AiStatsWindow{}
|
|
|
|
// AiStatsWindow struct for AiStatsWindow
|
|
type AiStatsWindow struct {
|
|
Events *int32 `json:"events,omitempty"`
|
|
Since *string `json:"since,omitempty"`
|
|
Until *string `json:"until,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _AiStatsWindow AiStatsWindow
|
|
|
|
// NewAiStatsWindow instantiates a new AiStatsWindow 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 NewAiStatsWindow() *AiStatsWindow {
|
|
this := AiStatsWindow{}
|
|
return &this
|
|
}
|
|
|
|
// NewAiStatsWindowWithDefaults instantiates a new AiStatsWindow 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 NewAiStatsWindowWithDefaults() *AiStatsWindow {
|
|
this := AiStatsWindow{}
|
|
return &this
|
|
}
|
|
|
|
// GetEvents returns the Events field value if set, zero value otherwise.
|
|
func (o *AiStatsWindow) GetEvents() int32 {
|
|
if o == nil || IsNil(o.Events) {
|
|
var ret int32
|
|
return ret
|
|
}
|
|
return *o.Events
|
|
}
|
|
|
|
// GetEventsOk returns a tuple with the Events field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AiStatsWindow) GetEventsOk() (*int32, bool) {
|
|
if o == nil || IsNil(o.Events) {
|
|
return nil, false
|
|
}
|
|
return o.Events, true
|
|
}
|
|
|
|
// HasEvents returns a boolean if a field has been set.
|
|
func (o *AiStatsWindow) HasEvents() bool {
|
|
if o != nil && !IsNil(o.Events) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetEvents gets a reference to the given int32 and assigns it to the Events field.
|
|
func (o *AiStatsWindow) SetEvents(v int32) {
|
|
o.Events = &v
|
|
}
|
|
|
|
// GetSince returns the Since field value if set, zero value otherwise.
|
|
func (o *AiStatsWindow) GetSince() string {
|
|
if o == nil || IsNil(o.Since) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Since
|
|
}
|
|
|
|
// GetSinceOk returns a tuple with the Since field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AiStatsWindow) GetSinceOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Since) {
|
|
return nil, false
|
|
}
|
|
return o.Since, true
|
|
}
|
|
|
|
// HasSince returns a boolean if a field has been set.
|
|
func (o *AiStatsWindow) HasSince() bool {
|
|
if o != nil && !IsNil(o.Since) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetSince gets a reference to the given string and assigns it to the Since field.
|
|
func (o *AiStatsWindow) SetSince(v string) {
|
|
o.Since = &v
|
|
}
|
|
|
|
// GetUntil returns the Until field value if set, zero value otherwise.
|
|
func (o *AiStatsWindow) GetUntil() string {
|
|
if o == nil || IsNil(o.Until) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Until
|
|
}
|
|
|
|
// GetUntilOk returns a tuple with the Until field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *AiStatsWindow) GetUntilOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Until) {
|
|
return nil, false
|
|
}
|
|
return o.Until, true
|
|
}
|
|
|
|
// HasUntil returns a boolean if a field has been set.
|
|
func (o *AiStatsWindow) HasUntil() bool {
|
|
if o != nil && !IsNil(o.Until) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetUntil gets a reference to the given string and assigns it to the Until field.
|
|
func (o *AiStatsWindow) SetUntil(v string) {
|
|
o.Until = &v
|
|
}
|
|
|
|
func (o AiStatsWindow) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o AiStatsWindow) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Events) {
|
|
toSerialize["events"] = o.Events
|
|
}
|
|
if !IsNil(o.Since) {
|
|
toSerialize["since"] = o.Since
|
|
}
|
|
if !IsNil(o.Until) {
|
|
toSerialize["until"] = o.Until
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *AiStatsWindow) UnmarshalJSON(data []byte) (err error) {
|
|
varAiStatsWindow := _AiStatsWindow{}
|
|
|
|
err = json.Unmarshal(data, &varAiStatsWindow)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = AiStatsWindow(varAiStatsWindow)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "events")
|
|
delete(additionalProperties, "since")
|
|
delete(additionalProperties, "until")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableAiStatsWindow struct {
|
|
value *AiStatsWindow
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableAiStatsWindow) Get() *AiStatsWindow {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableAiStatsWindow) Set(val *AiStatsWindow) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableAiStatsWindow) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableAiStatsWindow) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableAiStatsWindow(val *AiStatsWindow) *NullableAiStatsWindow {
|
|
return &NullableAiStatsWindow{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableAiStatsWindow) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableAiStatsWindow) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|