mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
307 lines
8.2 KiB
Go
307 lines
8.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 ExperimentAnalyzeQuery type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &ExperimentAnalyzeQuery{}
|
|
|
|
// ExperimentAnalyzeQuery struct for ExperimentAnalyzeQuery
|
|
type ExperimentAnalyzeQuery struct {
|
|
// Alpha overrides the 0.05 two-tailed significance threshold when it lies strictly between 0 and 1; anything else leaves the default in place.
|
|
Alpha *float64 `json:"alpha,omitempty"`
|
|
// Days is how far back to read when no start is given: 1 to 365, 30 by default. A value outside that range leaves the default in place.
|
|
Days *int64 `json:"days,omitempty"`
|
|
// End is the window's exclusive end in RFC3339, defaulting to now.
|
|
End *string `json:"end,omitempty"`
|
|
// ID is the experiment the URL names.
|
|
Id *string `json:"id,omitempty"`
|
|
// Start is the window's inclusive start in RFC3339. Given, it wins over days.
|
|
Start *string `json:"start,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _ExperimentAnalyzeQuery ExperimentAnalyzeQuery
|
|
|
|
// NewExperimentAnalyzeQuery instantiates a new ExperimentAnalyzeQuery 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 NewExperimentAnalyzeQuery() *ExperimentAnalyzeQuery {
|
|
this := ExperimentAnalyzeQuery{}
|
|
return &this
|
|
}
|
|
|
|
// NewExperimentAnalyzeQueryWithDefaults instantiates a new ExperimentAnalyzeQuery 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 NewExperimentAnalyzeQueryWithDefaults() *ExperimentAnalyzeQuery {
|
|
this := ExperimentAnalyzeQuery{}
|
|
return &this
|
|
}
|
|
|
|
// GetAlpha returns the Alpha field value if set, zero value otherwise.
|
|
func (o *ExperimentAnalyzeQuery) GetAlpha() float64 {
|
|
if o == nil || IsNil(o.Alpha) {
|
|
var ret float64
|
|
return ret
|
|
}
|
|
return *o.Alpha
|
|
}
|
|
|
|
// GetAlphaOk returns a tuple with the Alpha field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ExperimentAnalyzeQuery) GetAlphaOk() (*float64, bool) {
|
|
if o == nil || IsNil(o.Alpha) {
|
|
return nil, false
|
|
}
|
|
return o.Alpha, true
|
|
}
|
|
|
|
// HasAlpha returns a boolean if a field has been set.
|
|
func (o *ExperimentAnalyzeQuery) HasAlpha() bool {
|
|
if o != nil && !IsNil(o.Alpha) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetAlpha gets a reference to the given float64 and assigns it to the Alpha field.
|
|
func (o *ExperimentAnalyzeQuery) SetAlpha(v float64) {
|
|
o.Alpha = &v
|
|
}
|
|
|
|
// GetDays returns the Days field value if set, zero value otherwise.
|
|
func (o *ExperimentAnalyzeQuery) GetDays() int64 {
|
|
if o == nil || IsNil(o.Days) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.Days
|
|
}
|
|
|
|
// GetDaysOk returns a tuple with the Days field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ExperimentAnalyzeQuery) GetDaysOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.Days) {
|
|
return nil, false
|
|
}
|
|
return o.Days, true
|
|
}
|
|
|
|
// HasDays returns a boolean if a field has been set.
|
|
func (o *ExperimentAnalyzeQuery) HasDays() bool {
|
|
if o != nil && !IsNil(o.Days) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetDays gets a reference to the given int64 and assigns it to the Days field.
|
|
func (o *ExperimentAnalyzeQuery) SetDays(v int64) {
|
|
o.Days = &v
|
|
}
|
|
|
|
// GetEnd returns the End field value if set, zero value otherwise.
|
|
func (o *ExperimentAnalyzeQuery) 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 *ExperimentAnalyzeQuery) 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 *ExperimentAnalyzeQuery) 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 *ExperimentAnalyzeQuery) SetEnd(v string) {
|
|
o.End = &v
|
|
}
|
|
|
|
// GetId returns the Id field value if set, zero value otherwise.
|
|
func (o *ExperimentAnalyzeQuery) GetId() string {
|
|
if o == nil || IsNil(o.Id) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Id
|
|
}
|
|
|
|
// GetIdOk returns a tuple with the Id field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ExperimentAnalyzeQuery) GetIdOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Id) {
|
|
return nil, false
|
|
}
|
|
return o.Id, true
|
|
}
|
|
|
|
// HasId returns a boolean if a field has been set.
|
|
func (o *ExperimentAnalyzeQuery) HasId() bool {
|
|
if o != nil && !IsNil(o.Id) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetId gets a reference to the given string and assigns it to the Id field.
|
|
func (o *ExperimentAnalyzeQuery) SetId(v string) {
|
|
o.Id = &v
|
|
}
|
|
|
|
// GetStart returns the Start field value if set, zero value otherwise.
|
|
func (o *ExperimentAnalyzeQuery) 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 *ExperimentAnalyzeQuery) 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 *ExperimentAnalyzeQuery) 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 *ExperimentAnalyzeQuery) SetStart(v string) {
|
|
o.Start = &v
|
|
}
|
|
|
|
func (o ExperimentAnalyzeQuery) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o ExperimentAnalyzeQuery) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Alpha) {
|
|
toSerialize["alpha"] = o.Alpha
|
|
}
|
|
if !IsNil(o.Days) {
|
|
toSerialize["days"] = o.Days
|
|
}
|
|
if !IsNil(o.End) {
|
|
toSerialize["end"] = o.End
|
|
}
|
|
if !IsNil(o.Id) {
|
|
toSerialize["id"] = o.Id
|
|
}
|
|
if !IsNil(o.Start) {
|
|
toSerialize["start"] = o.Start
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *ExperimentAnalyzeQuery) UnmarshalJSON(data []byte) (err error) {
|
|
varExperimentAnalyzeQuery := _ExperimentAnalyzeQuery{}
|
|
|
|
err = json.Unmarshal(data, &varExperimentAnalyzeQuery)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = ExperimentAnalyzeQuery(varExperimentAnalyzeQuery)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "alpha")
|
|
delete(additionalProperties, "days")
|
|
delete(additionalProperties, "end")
|
|
delete(additionalProperties, "id")
|
|
delete(additionalProperties, "start")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableExperimentAnalyzeQuery struct {
|
|
value *ExperimentAnalyzeQuery
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableExperimentAnalyzeQuery) Get() *ExperimentAnalyzeQuery {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableExperimentAnalyzeQuery) Set(val *ExperimentAnalyzeQuery) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableExperimentAnalyzeQuery) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableExperimentAnalyzeQuery) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableExperimentAnalyzeQuery(val *ExperimentAnalyzeQuery) *NullableExperimentAnalyzeQuery {
|
|
return &NullableExperimentAnalyzeQuery{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableExperimentAnalyzeQuery) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableExperimentAnalyzeQuery) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|