mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
459 lines
12 KiB
Go
459 lines
12 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 ExperimentOutcome type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &ExperimentOutcome{}
|
|
|
|
// ExperimentOutcome struct for ExperimentOutcome
|
|
type ExperimentOutcome struct {
|
|
// true on the baseline arm; its own lift and stats are zero
|
|
Control *bool `json:"control,omitempty"`
|
|
// of those, how many fired the metric event
|
|
Converted *int64 `json:"converted,omitempty"`
|
|
// subjects the arm enrolled — the denominator
|
|
Exposed *int64 `json:"exposed,omitempty"`
|
|
// relative to control: (rate-ctrl)/ctrl
|
|
Lift *float64 `json:"lift,omitempty"`
|
|
// two-tailed p vs control
|
|
PValue *float64 `json:"pValue,omitempty"`
|
|
// converted over exposed
|
|
Rate *float64 `json:"rate,omitempty"`
|
|
// pValue < alpha
|
|
Significant *bool `json:"significant,omitempty"`
|
|
// the arm this row measures
|
|
Variant *string `json:"variant,omitempty"`
|
|
// two-proportion z vs control
|
|
Z *float64 `json:"z,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _ExperimentOutcome ExperimentOutcome
|
|
|
|
// NewExperimentOutcome instantiates a new ExperimentOutcome 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 NewExperimentOutcome() *ExperimentOutcome {
|
|
this := ExperimentOutcome{}
|
|
return &this
|
|
}
|
|
|
|
// NewExperimentOutcomeWithDefaults instantiates a new ExperimentOutcome 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 NewExperimentOutcomeWithDefaults() *ExperimentOutcome {
|
|
this := ExperimentOutcome{}
|
|
return &this
|
|
}
|
|
|
|
// GetControl returns the Control field value if set, zero value otherwise.
|
|
func (o *ExperimentOutcome) GetControl() bool {
|
|
if o == nil || IsNil(o.Control) {
|
|
var ret bool
|
|
return ret
|
|
}
|
|
return *o.Control
|
|
}
|
|
|
|
// GetControlOk returns a tuple with the Control field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ExperimentOutcome) GetControlOk() (*bool, bool) {
|
|
if o == nil || IsNil(o.Control) {
|
|
return nil, false
|
|
}
|
|
return o.Control, true
|
|
}
|
|
|
|
// HasControl returns a boolean if a field has been set.
|
|
func (o *ExperimentOutcome) HasControl() bool {
|
|
if o != nil && !IsNil(o.Control) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetControl gets a reference to the given bool and assigns it to the Control field.
|
|
func (o *ExperimentOutcome) SetControl(v bool) {
|
|
o.Control = &v
|
|
}
|
|
|
|
// GetConverted returns the Converted field value if set, zero value otherwise.
|
|
func (o *ExperimentOutcome) GetConverted() int64 {
|
|
if o == nil || IsNil(o.Converted) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.Converted
|
|
}
|
|
|
|
// GetConvertedOk returns a tuple with the Converted field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ExperimentOutcome) GetConvertedOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.Converted) {
|
|
return nil, false
|
|
}
|
|
return o.Converted, true
|
|
}
|
|
|
|
// HasConverted returns a boolean if a field has been set.
|
|
func (o *ExperimentOutcome) HasConverted() bool {
|
|
if o != nil && !IsNil(o.Converted) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetConverted gets a reference to the given int64 and assigns it to the Converted field.
|
|
func (o *ExperimentOutcome) SetConverted(v int64) {
|
|
o.Converted = &v
|
|
}
|
|
|
|
// GetExposed returns the Exposed field value if set, zero value otherwise.
|
|
func (o *ExperimentOutcome) GetExposed() int64 {
|
|
if o == nil || IsNil(o.Exposed) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.Exposed
|
|
}
|
|
|
|
// GetExposedOk returns a tuple with the Exposed field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ExperimentOutcome) GetExposedOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.Exposed) {
|
|
return nil, false
|
|
}
|
|
return o.Exposed, true
|
|
}
|
|
|
|
// HasExposed returns a boolean if a field has been set.
|
|
func (o *ExperimentOutcome) HasExposed() bool {
|
|
if o != nil && !IsNil(o.Exposed) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetExposed gets a reference to the given int64 and assigns it to the Exposed field.
|
|
func (o *ExperimentOutcome) SetExposed(v int64) {
|
|
o.Exposed = &v
|
|
}
|
|
|
|
// GetLift returns the Lift field value if set, zero value otherwise.
|
|
func (o *ExperimentOutcome) GetLift() float64 {
|
|
if o == nil || IsNil(o.Lift) {
|
|
var ret float64
|
|
return ret
|
|
}
|
|
return *o.Lift
|
|
}
|
|
|
|
// GetLiftOk returns a tuple with the Lift field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ExperimentOutcome) GetLiftOk() (*float64, bool) {
|
|
if o == nil || IsNil(o.Lift) {
|
|
return nil, false
|
|
}
|
|
return o.Lift, true
|
|
}
|
|
|
|
// HasLift returns a boolean if a field has been set.
|
|
func (o *ExperimentOutcome) HasLift() bool {
|
|
if o != nil && !IsNil(o.Lift) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetLift gets a reference to the given float64 and assigns it to the Lift field.
|
|
func (o *ExperimentOutcome) SetLift(v float64) {
|
|
o.Lift = &v
|
|
}
|
|
|
|
// GetPValue returns the PValue field value if set, zero value otherwise.
|
|
func (o *ExperimentOutcome) GetPValue() float64 {
|
|
if o == nil || IsNil(o.PValue) {
|
|
var ret float64
|
|
return ret
|
|
}
|
|
return *o.PValue
|
|
}
|
|
|
|
// GetPValueOk returns a tuple with the PValue field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ExperimentOutcome) GetPValueOk() (*float64, bool) {
|
|
if o == nil || IsNil(o.PValue) {
|
|
return nil, false
|
|
}
|
|
return o.PValue, true
|
|
}
|
|
|
|
// HasPValue returns a boolean if a field has been set.
|
|
func (o *ExperimentOutcome) HasPValue() bool {
|
|
if o != nil && !IsNil(o.PValue) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetPValue gets a reference to the given float64 and assigns it to the PValue field.
|
|
func (o *ExperimentOutcome) SetPValue(v float64) {
|
|
o.PValue = &v
|
|
}
|
|
|
|
// GetRate returns the Rate field value if set, zero value otherwise.
|
|
func (o *ExperimentOutcome) GetRate() float64 {
|
|
if o == nil || IsNil(o.Rate) {
|
|
var ret float64
|
|
return ret
|
|
}
|
|
return *o.Rate
|
|
}
|
|
|
|
// GetRateOk returns a tuple with the Rate field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ExperimentOutcome) GetRateOk() (*float64, bool) {
|
|
if o == nil || IsNil(o.Rate) {
|
|
return nil, false
|
|
}
|
|
return o.Rate, true
|
|
}
|
|
|
|
// HasRate returns a boolean if a field has been set.
|
|
func (o *ExperimentOutcome) HasRate() bool {
|
|
if o != nil && !IsNil(o.Rate) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetRate gets a reference to the given float64 and assigns it to the Rate field.
|
|
func (o *ExperimentOutcome) SetRate(v float64) {
|
|
o.Rate = &v
|
|
}
|
|
|
|
// GetSignificant returns the Significant field value if set, zero value otherwise.
|
|
func (o *ExperimentOutcome) GetSignificant() bool {
|
|
if o == nil || IsNil(o.Significant) {
|
|
var ret bool
|
|
return ret
|
|
}
|
|
return *o.Significant
|
|
}
|
|
|
|
// GetSignificantOk returns a tuple with the Significant field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ExperimentOutcome) GetSignificantOk() (*bool, bool) {
|
|
if o == nil || IsNil(o.Significant) {
|
|
return nil, false
|
|
}
|
|
return o.Significant, true
|
|
}
|
|
|
|
// HasSignificant returns a boolean if a field has been set.
|
|
func (o *ExperimentOutcome) HasSignificant() bool {
|
|
if o != nil && !IsNil(o.Significant) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetSignificant gets a reference to the given bool and assigns it to the Significant field.
|
|
func (o *ExperimentOutcome) SetSignificant(v bool) {
|
|
o.Significant = &v
|
|
}
|
|
|
|
// GetVariant returns the Variant field value if set, zero value otherwise.
|
|
func (o *ExperimentOutcome) GetVariant() string {
|
|
if o == nil || IsNil(o.Variant) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Variant
|
|
}
|
|
|
|
// GetVariantOk returns a tuple with the Variant field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ExperimentOutcome) GetVariantOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Variant) {
|
|
return nil, false
|
|
}
|
|
return o.Variant, true
|
|
}
|
|
|
|
// HasVariant returns a boolean if a field has been set.
|
|
func (o *ExperimentOutcome) HasVariant() bool {
|
|
if o != nil && !IsNil(o.Variant) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetVariant gets a reference to the given string and assigns it to the Variant field.
|
|
func (o *ExperimentOutcome) SetVariant(v string) {
|
|
o.Variant = &v
|
|
}
|
|
|
|
// GetZ returns the Z field value if set, zero value otherwise.
|
|
func (o *ExperimentOutcome) GetZ() float64 {
|
|
if o == nil || IsNil(o.Z) {
|
|
var ret float64
|
|
return ret
|
|
}
|
|
return *o.Z
|
|
}
|
|
|
|
// GetZOk returns a tuple with the Z field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ExperimentOutcome) GetZOk() (*float64, bool) {
|
|
if o == nil || IsNil(o.Z) {
|
|
return nil, false
|
|
}
|
|
return o.Z, true
|
|
}
|
|
|
|
// HasZ returns a boolean if a field has been set.
|
|
func (o *ExperimentOutcome) HasZ() bool {
|
|
if o != nil && !IsNil(o.Z) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetZ gets a reference to the given float64 and assigns it to the Z field.
|
|
func (o *ExperimentOutcome) SetZ(v float64) {
|
|
o.Z = &v
|
|
}
|
|
|
|
func (o ExperimentOutcome) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o ExperimentOutcome) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Control) {
|
|
toSerialize["control"] = o.Control
|
|
}
|
|
if !IsNil(o.Converted) {
|
|
toSerialize["converted"] = o.Converted
|
|
}
|
|
if !IsNil(o.Exposed) {
|
|
toSerialize["exposed"] = o.Exposed
|
|
}
|
|
if !IsNil(o.Lift) {
|
|
toSerialize["lift"] = o.Lift
|
|
}
|
|
if !IsNil(o.PValue) {
|
|
toSerialize["pValue"] = o.PValue
|
|
}
|
|
if !IsNil(o.Rate) {
|
|
toSerialize["rate"] = o.Rate
|
|
}
|
|
if !IsNil(o.Significant) {
|
|
toSerialize["significant"] = o.Significant
|
|
}
|
|
if !IsNil(o.Variant) {
|
|
toSerialize["variant"] = o.Variant
|
|
}
|
|
if !IsNil(o.Z) {
|
|
toSerialize["z"] = o.Z
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *ExperimentOutcome) UnmarshalJSON(data []byte) (err error) {
|
|
varExperimentOutcome := _ExperimentOutcome{}
|
|
|
|
err = json.Unmarshal(data, &varExperimentOutcome)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = ExperimentOutcome(varExperimentOutcome)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "control")
|
|
delete(additionalProperties, "converted")
|
|
delete(additionalProperties, "exposed")
|
|
delete(additionalProperties, "lift")
|
|
delete(additionalProperties, "pValue")
|
|
delete(additionalProperties, "rate")
|
|
delete(additionalProperties, "significant")
|
|
delete(additionalProperties, "variant")
|
|
delete(additionalProperties, "z")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableExperimentOutcome struct {
|
|
value *ExperimentOutcome
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableExperimentOutcome) Get() *ExperimentOutcome {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableExperimentOutcome) Set(val *ExperimentOutcome) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableExperimentOutcome) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableExperimentOutcome) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableExperimentOutcome(val *ExperimentOutcome) *NullableExperimentOutcome {
|
|
return &NullableExperimentOutcome{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableExperimentOutcome) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableExperimentOutcome) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|