mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
421 lines
12 KiB
Go
421 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 DatasetRiskSplitCounts type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &DatasetRiskSplitCounts{}
|
|
|
|
// DatasetRiskSplitCounts struct for DatasetRiskSplitCounts
|
|
type DatasetRiskSplitCounts struct {
|
|
// Judged is how many rows carry a disposition. It is zero until a label plane writes one, and reporting it plainly is what lets a model plane refuse to rank rather than name a winner it cannot justify.
|
|
Judged *int64 `json:"judged,omitempty"`
|
|
// Productive is how many judged rows carry the one disposition.
|
|
Productive *int64 `json:"productive,omitempty"`
|
|
// Rows is how many rows the version holds across every split. It is the size of the version, not of the source window — the horizon, the cuts and the row cap all bind before this number.
|
|
Rows *int64 `json:"rows,omitempty"`
|
|
// Subjects is how many distinct subjects the rows belong to. Every row of one subject is in ONE split, so this is the real sample size — the row count flatters it whenever a subject is active.
|
|
Subjects *int64 `json:"subjects,omitempty"`
|
|
// Test is how many fall after the second cut — the LATEST slice, and the only one a score is honest about, since the split is temporal.
|
|
Test *int64 `json:"test,omitempty"`
|
|
// Train is how many rows fall before the first cut — the EARLIEST slice of the window, which is what a model is fitted on.
|
|
Train *int64 `json:"train,omitempty"`
|
|
// Unproductive is how many carry the other. With Productive it accounts for Judged, so the class imbalance is visible before anyone trains on it; both stay 0 while Judged is 0.
|
|
Unproductive *int64 `json:"unproductive,omitempty"`
|
|
// Val is how many fall between the two cuts, held out for tuning.
|
|
Val *int64 `json:"val,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _DatasetRiskSplitCounts DatasetRiskSplitCounts
|
|
|
|
// NewDatasetRiskSplitCounts instantiates a new DatasetRiskSplitCounts 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 NewDatasetRiskSplitCounts() *DatasetRiskSplitCounts {
|
|
this := DatasetRiskSplitCounts{}
|
|
return &this
|
|
}
|
|
|
|
// NewDatasetRiskSplitCountsWithDefaults instantiates a new DatasetRiskSplitCounts 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 NewDatasetRiskSplitCountsWithDefaults() *DatasetRiskSplitCounts {
|
|
this := DatasetRiskSplitCounts{}
|
|
return &this
|
|
}
|
|
|
|
// GetJudged returns the Judged field value if set, zero value otherwise.
|
|
func (o *DatasetRiskSplitCounts) GetJudged() int64 {
|
|
if o == nil || IsNil(o.Judged) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.Judged
|
|
}
|
|
|
|
// GetJudgedOk returns a tuple with the Judged field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *DatasetRiskSplitCounts) GetJudgedOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.Judged) {
|
|
return nil, false
|
|
}
|
|
return o.Judged, true
|
|
}
|
|
|
|
// HasJudged returns a boolean if a field has been set.
|
|
func (o *DatasetRiskSplitCounts) HasJudged() bool {
|
|
if o != nil && !IsNil(o.Judged) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetJudged gets a reference to the given int64 and assigns it to the Judged field.
|
|
func (o *DatasetRiskSplitCounts) SetJudged(v int64) {
|
|
o.Judged = &v
|
|
}
|
|
|
|
// GetProductive returns the Productive field value if set, zero value otherwise.
|
|
func (o *DatasetRiskSplitCounts) GetProductive() int64 {
|
|
if o == nil || IsNil(o.Productive) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.Productive
|
|
}
|
|
|
|
// GetProductiveOk returns a tuple with the Productive field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *DatasetRiskSplitCounts) GetProductiveOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.Productive) {
|
|
return nil, false
|
|
}
|
|
return o.Productive, true
|
|
}
|
|
|
|
// HasProductive returns a boolean if a field has been set.
|
|
func (o *DatasetRiskSplitCounts) HasProductive() bool {
|
|
if o != nil && !IsNil(o.Productive) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetProductive gets a reference to the given int64 and assigns it to the Productive field.
|
|
func (o *DatasetRiskSplitCounts) SetProductive(v int64) {
|
|
o.Productive = &v
|
|
}
|
|
|
|
// GetRows returns the Rows field value if set, zero value otherwise.
|
|
func (o *DatasetRiskSplitCounts) GetRows() int64 {
|
|
if o == nil || IsNil(o.Rows) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.Rows
|
|
}
|
|
|
|
// GetRowsOk returns a tuple with the Rows field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *DatasetRiskSplitCounts) GetRowsOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.Rows) {
|
|
return nil, false
|
|
}
|
|
return o.Rows, true
|
|
}
|
|
|
|
// HasRows returns a boolean if a field has been set.
|
|
func (o *DatasetRiskSplitCounts) HasRows() bool {
|
|
if o != nil && !IsNil(o.Rows) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetRows gets a reference to the given int64 and assigns it to the Rows field.
|
|
func (o *DatasetRiskSplitCounts) SetRows(v int64) {
|
|
o.Rows = &v
|
|
}
|
|
|
|
// GetSubjects returns the Subjects field value if set, zero value otherwise.
|
|
func (o *DatasetRiskSplitCounts) GetSubjects() int64 {
|
|
if o == nil || IsNil(o.Subjects) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.Subjects
|
|
}
|
|
|
|
// GetSubjectsOk returns a tuple with the Subjects field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *DatasetRiskSplitCounts) GetSubjectsOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.Subjects) {
|
|
return nil, false
|
|
}
|
|
return o.Subjects, true
|
|
}
|
|
|
|
// HasSubjects returns a boolean if a field has been set.
|
|
func (o *DatasetRiskSplitCounts) HasSubjects() bool {
|
|
if o != nil && !IsNil(o.Subjects) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetSubjects gets a reference to the given int64 and assigns it to the Subjects field.
|
|
func (o *DatasetRiskSplitCounts) SetSubjects(v int64) {
|
|
o.Subjects = &v
|
|
}
|
|
|
|
// GetTest returns the Test field value if set, zero value otherwise.
|
|
func (o *DatasetRiskSplitCounts) GetTest() int64 {
|
|
if o == nil || IsNil(o.Test) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.Test
|
|
}
|
|
|
|
// GetTestOk returns a tuple with the Test field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *DatasetRiskSplitCounts) GetTestOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.Test) {
|
|
return nil, false
|
|
}
|
|
return o.Test, true
|
|
}
|
|
|
|
// HasTest returns a boolean if a field has been set.
|
|
func (o *DatasetRiskSplitCounts) HasTest() bool {
|
|
if o != nil && !IsNil(o.Test) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetTest gets a reference to the given int64 and assigns it to the Test field.
|
|
func (o *DatasetRiskSplitCounts) SetTest(v int64) {
|
|
o.Test = &v
|
|
}
|
|
|
|
// GetTrain returns the Train field value if set, zero value otherwise.
|
|
func (o *DatasetRiskSplitCounts) GetTrain() int64 {
|
|
if o == nil || IsNil(o.Train) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.Train
|
|
}
|
|
|
|
// GetTrainOk returns a tuple with the Train field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *DatasetRiskSplitCounts) GetTrainOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.Train) {
|
|
return nil, false
|
|
}
|
|
return o.Train, true
|
|
}
|
|
|
|
// HasTrain returns a boolean if a field has been set.
|
|
func (o *DatasetRiskSplitCounts) HasTrain() bool {
|
|
if o != nil && !IsNil(o.Train) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetTrain gets a reference to the given int64 and assigns it to the Train field.
|
|
func (o *DatasetRiskSplitCounts) SetTrain(v int64) {
|
|
o.Train = &v
|
|
}
|
|
|
|
// GetUnproductive returns the Unproductive field value if set, zero value otherwise.
|
|
func (o *DatasetRiskSplitCounts) GetUnproductive() int64 {
|
|
if o == nil || IsNil(o.Unproductive) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.Unproductive
|
|
}
|
|
|
|
// GetUnproductiveOk returns a tuple with the Unproductive field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *DatasetRiskSplitCounts) GetUnproductiveOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.Unproductive) {
|
|
return nil, false
|
|
}
|
|
return o.Unproductive, true
|
|
}
|
|
|
|
// HasUnproductive returns a boolean if a field has been set.
|
|
func (o *DatasetRiskSplitCounts) HasUnproductive() bool {
|
|
if o != nil && !IsNil(o.Unproductive) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetUnproductive gets a reference to the given int64 and assigns it to the Unproductive field.
|
|
func (o *DatasetRiskSplitCounts) SetUnproductive(v int64) {
|
|
o.Unproductive = &v
|
|
}
|
|
|
|
// GetVal returns the Val field value if set, zero value otherwise.
|
|
func (o *DatasetRiskSplitCounts) GetVal() int64 {
|
|
if o == nil || IsNil(o.Val) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.Val
|
|
}
|
|
|
|
// GetValOk returns a tuple with the Val field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *DatasetRiskSplitCounts) GetValOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.Val) {
|
|
return nil, false
|
|
}
|
|
return o.Val, true
|
|
}
|
|
|
|
// HasVal returns a boolean if a field has been set.
|
|
func (o *DatasetRiskSplitCounts) HasVal() bool {
|
|
if o != nil && !IsNil(o.Val) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetVal gets a reference to the given int64 and assigns it to the Val field.
|
|
func (o *DatasetRiskSplitCounts) SetVal(v int64) {
|
|
o.Val = &v
|
|
}
|
|
|
|
func (o DatasetRiskSplitCounts) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o DatasetRiskSplitCounts) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Judged) {
|
|
toSerialize["judged"] = o.Judged
|
|
}
|
|
if !IsNil(o.Productive) {
|
|
toSerialize["productive"] = o.Productive
|
|
}
|
|
if !IsNil(o.Rows) {
|
|
toSerialize["rows"] = o.Rows
|
|
}
|
|
if !IsNil(o.Subjects) {
|
|
toSerialize["subjects"] = o.Subjects
|
|
}
|
|
if !IsNil(o.Test) {
|
|
toSerialize["test"] = o.Test
|
|
}
|
|
if !IsNil(o.Train) {
|
|
toSerialize["train"] = o.Train
|
|
}
|
|
if !IsNil(o.Unproductive) {
|
|
toSerialize["unproductive"] = o.Unproductive
|
|
}
|
|
if !IsNil(o.Val) {
|
|
toSerialize["val"] = o.Val
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *DatasetRiskSplitCounts) UnmarshalJSON(data []byte) (err error) {
|
|
varDatasetRiskSplitCounts := _DatasetRiskSplitCounts{}
|
|
|
|
err = json.Unmarshal(data, &varDatasetRiskSplitCounts)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = DatasetRiskSplitCounts(varDatasetRiskSplitCounts)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "judged")
|
|
delete(additionalProperties, "productive")
|
|
delete(additionalProperties, "rows")
|
|
delete(additionalProperties, "subjects")
|
|
delete(additionalProperties, "test")
|
|
delete(additionalProperties, "train")
|
|
delete(additionalProperties, "unproductive")
|
|
delete(additionalProperties, "val")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableDatasetRiskSplitCounts struct {
|
|
value *DatasetRiskSplitCounts
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableDatasetRiskSplitCounts) Get() *DatasetRiskSplitCounts {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableDatasetRiskSplitCounts) Set(val *DatasetRiskSplitCounts) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableDatasetRiskSplitCounts) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableDatasetRiskSplitCounts) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableDatasetRiskSplitCounts(val *DatasetRiskSplitCounts) *NullableDatasetRiskSplitCounts {
|
|
return &NullableDatasetRiskSplitCounts{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableDatasetRiskSplitCounts) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableDatasetRiskSplitCounts) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|