mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
611 lines
17 KiB
Go
611 lines
17 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 DatasetRiskDataset type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &DatasetRiskDataset{}
|
|
|
|
// DatasetRiskDataset struct for DatasetRiskDataset
|
|
type DatasetRiskDataset struct {
|
|
// At is when this version last changed state, RFC 3339 UTC.
|
|
At *string `json:"at,omitempty"`
|
|
// By is who moved it there: the validated user, or the org itself when the caller is a machine with no user behind it.
|
|
By *string `json:"by,omitempty"`
|
|
// Counts is how the rows fall across the splits.
|
|
Counts *DatasetRiskSplitCounts `json:"counts,omitempty"`
|
|
// Digest fingerprints the SPEC and the ROWS together. Two materialisations of one spec agree on it or the plane says they do not.
|
|
Digest *string `json:"digest,omitempty"`
|
|
// Name identifies the dataset across all of its versions.
|
|
Name *string `json:"name,omitempty"`
|
|
// Oversize is how many of the window's subjects this version could NOT carry because their subject identity exceeds the plane's per-subject byte bound. It is on the wire, not only in a log, because it is the one degradation a caller cannot otherwise detect: the rows that are here look complete, and a dataset silently missing a population is a model silently blind to it. Non-zero does not make a version invalid — it makes it a version whose coverage is STATED. Zero is the normal case and omits.
|
|
Oversize *int64 `json:"oversize,omitempty"`
|
|
// Refusal names why there are no bytes, when there are none.
|
|
Refusal *string `json:"refusal,omitempty"`
|
|
// Running is true while THIS process is materialising the version. A version that is `materializing` and not running was started by a process that is gone — two states the register cannot tell apart, because a register cannot know which processes are alive.
|
|
Running *bool `json:"running,omitempty"`
|
|
// Share is the fraction of the window's subjects admitted, in thousandths. 1000 means the whole window fitted under the cap; anything less means the version is a reproducible sample and says by how much.
|
|
Share *int64 `json:"share,omitempty"`
|
|
// Spec is the bound query this version was built from, exactly as recorded.
|
|
Spec *DatasetRiskDatasetSpec `json:"spec,omitempty"`
|
|
// Status is declared, materializing, ready or refused. Only `ready` has bytes, and `ready` is terminal: a published version is never rewritten.
|
|
Status *string `json:"status,omitempty"`
|
|
// Truncated is true when the row cap bound before the window ran out. The trailing subject is dropped whole when that happens, because half a subject on one side of a split is exactly the leak the grouping prevents.
|
|
Truncated *bool `json:"truncated,omitempty"`
|
|
// Version is which version this is, from 1 and monotone within the dataset. A number is never reused — not even after a disposal, where the next declare continues the count — so \"signups v3\" means one thing forever, which is what makes a model's citation of it checkable.
|
|
Version *int64 `json:"version,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _DatasetRiskDataset DatasetRiskDataset
|
|
|
|
// NewDatasetRiskDataset instantiates a new DatasetRiskDataset 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 NewDatasetRiskDataset() *DatasetRiskDataset {
|
|
this := DatasetRiskDataset{}
|
|
return &this
|
|
}
|
|
|
|
// NewDatasetRiskDatasetWithDefaults instantiates a new DatasetRiskDataset 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 NewDatasetRiskDatasetWithDefaults() *DatasetRiskDataset {
|
|
this := DatasetRiskDataset{}
|
|
return &this
|
|
}
|
|
|
|
// GetAt returns the At field value if set, zero value otherwise.
|
|
func (o *DatasetRiskDataset) GetAt() string {
|
|
if o == nil || IsNil(o.At) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.At
|
|
}
|
|
|
|
// GetAtOk returns a tuple with the At field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *DatasetRiskDataset) GetAtOk() (*string, bool) {
|
|
if o == nil || IsNil(o.At) {
|
|
return nil, false
|
|
}
|
|
return o.At, true
|
|
}
|
|
|
|
// HasAt returns a boolean if a field has been set.
|
|
func (o *DatasetRiskDataset) HasAt() bool {
|
|
if o != nil && !IsNil(o.At) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetAt gets a reference to the given string and assigns it to the At field.
|
|
func (o *DatasetRiskDataset) SetAt(v string) {
|
|
o.At = &v
|
|
}
|
|
|
|
// GetBy returns the By field value if set, zero value otherwise.
|
|
func (o *DatasetRiskDataset) GetBy() string {
|
|
if o == nil || IsNil(o.By) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.By
|
|
}
|
|
|
|
// GetByOk returns a tuple with the By field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *DatasetRiskDataset) GetByOk() (*string, bool) {
|
|
if o == nil || IsNil(o.By) {
|
|
return nil, false
|
|
}
|
|
return o.By, true
|
|
}
|
|
|
|
// HasBy returns a boolean if a field has been set.
|
|
func (o *DatasetRiskDataset) HasBy() bool {
|
|
if o != nil && !IsNil(o.By) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetBy gets a reference to the given string and assigns it to the By field.
|
|
func (o *DatasetRiskDataset) SetBy(v string) {
|
|
o.By = &v
|
|
}
|
|
|
|
// GetCounts returns the Counts field value if set, zero value otherwise.
|
|
func (o *DatasetRiskDataset) GetCounts() DatasetRiskSplitCounts {
|
|
if o == nil || IsNil(o.Counts) {
|
|
var ret DatasetRiskSplitCounts
|
|
return ret
|
|
}
|
|
return *o.Counts
|
|
}
|
|
|
|
// GetCountsOk returns a tuple with the Counts field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *DatasetRiskDataset) GetCountsOk() (*DatasetRiskSplitCounts, bool) {
|
|
if o == nil || IsNil(o.Counts) {
|
|
return nil, false
|
|
}
|
|
return o.Counts, true
|
|
}
|
|
|
|
// HasCounts returns a boolean if a field has been set.
|
|
func (o *DatasetRiskDataset) HasCounts() bool {
|
|
if o != nil && !IsNil(o.Counts) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetCounts gets a reference to the given DatasetRiskSplitCounts and assigns it to the Counts field.
|
|
func (o *DatasetRiskDataset) SetCounts(v DatasetRiskSplitCounts) {
|
|
o.Counts = &v
|
|
}
|
|
|
|
// GetDigest returns the Digest field value if set, zero value otherwise.
|
|
func (o *DatasetRiskDataset) GetDigest() string {
|
|
if o == nil || IsNil(o.Digest) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Digest
|
|
}
|
|
|
|
// GetDigestOk returns a tuple with the Digest field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *DatasetRiskDataset) GetDigestOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Digest) {
|
|
return nil, false
|
|
}
|
|
return o.Digest, true
|
|
}
|
|
|
|
// HasDigest returns a boolean if a field has been set.
|
|
func (o *DatasetRiskDataset) HasDigest() bool {
|
|
if o != nil && !IsNil(o.Digest) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetDigest gets a reference to the given string and assigns it to the Digest field.
|
|
func (o *DatasetRiskDataset) SetDigest(v string) {
|
|
o.Digest = &v
|
|
}
|
|
|
|
// GetName returns the Name field value if set, zero value otherwise.
|
|
func (o *DatasetRiskDataset) GetName() string {
|
|
if o == nil || IsNil(o.Name) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Name
|
|
}
|
|
|
|
// GetNameOk returns a tuple with the Name field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *DatasetRiskDataset) GetNameOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Name) {
|
|
return nil, false
|
|
}
|
|
return o.Name, true
|
|
}
|
|
|
|
// HasName returns a boolean if a field has been set.
|
|
func (o *DatasetRiskDataset) HasName() bool {
|
|
if o != nil && !IsNil(o.Name) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetName gets a reference to the given string and assigns it to the Name field.
|
|
func (o *DatasetRiskDataset) SetName(v string) {
|
|
o.Name = &v
|
|
}
|
|
|
|
// GetOversize returns the Oversize field value if set, zero value otherwise.
|
|
func (o *DatasetRiskDataset) GetOversize() int64 {
|
|
if o == nil || IsNil(o.Oversize) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.Oversize
|
|
}
|
|
|
|
// GetOversizeOk returns a tuple with the Oversize field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *DatasetRiskDataset) GetOversizeOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.Oversize) {
|
|
return nil, false
|
|
}
|
|
return o.Oversize, true
|
|
}
|
|
|
|
// HasOversize returns a boolean if a field has been set.
|
|
func (o *DatasetRiskDataset) HasOversize() bool {
|
|
if o != nil && !IsNil(o.Oversize) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetOversize gets a reference to the given int64 and assigns it to the Oversize field.
|
|
func (o *DatasetRiskDataset) SetOversize(v int64) {
|
|
o.Oversize = &v
|
|
}
|
|
|
|
// GetRefusal returns the Refusal field value if set, zero value otherwise.
|
|
func (o *DatasetRiskDataset) GetRefusal() string {
|
|
if o == nil || IsNil(o.Refusal) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Refusal
|
|
}
|
|
|
|
// GetRefusalOk returns a tuple with the Refusal field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *DatasetRiskDataset) GetRefusalOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Refusal) {
|
|
return nil, false
|
|
}
|
|
return o.Refusal, true
|
|
}
|
|
|
|
// HasRefusal returns a boolean if a field has been set.
|
|
func (o *DatasetRiskDataset) HasRefusal() bool {
|
|
if o != nil && !IsNil(o.Refusal) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetRefusal gets a reference to the given string and assigns it to the Refusal field.
|
|
func (o *DatasetRiskDataset) SetRefusal(v string) {
|
|
o.Refusal = &v
|
|
}
|
|
|
|
// GetRunning returns the Running field value if set, zero value otherwise.
|
|
func (o *DatasetRiskDataset) GetRunning() bool {
|
|
if o == nil || IsNil(o.Running) {
|
|
var ret bool
|
|
return ret
|
|
}
|
|
return *o.Running
|
|
}
|
|
|
|
// GetRunningOk returns a tuple with the Running field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *DatasetRiskDataset) GetRunningOk() (*bool, bool) {
|
|
if o == nil || IsNil(o.Running) {
|
|
return nil, false
|
|
}
|
|
return o.Running, true
|
|
}
|
|
|
|
// HasRunning returns a boolean if a field has been set.
|
|
func (o *DatasetRiskDataset) HasRunning() bool {
|
|
if o != nil && !IsNil(o.Running) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetRunning gets a reference to the given bool and assigns it to the Running field.
|
|
func (o *DatasetRiskDataset) SetRunning(v bool) {
|
|
o.Running = &v
|
|
}
|
|
|
|
// GetShare returns the Share field value if set, zero value otherwise.
|
|
func (o *DatasetRiskDataset) GetShare() int64 {
|
|
if o == nil || IsNil(o.Share) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.Share
|
|
}
|
|
|
|
// GetShareOk returns a tuple with the Share field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *DatasetRiskDataset) GetShareOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.Share) {
|
|
return nil, false
|
|
}
|
|
return o.Share, true
|
|
}
|
|
|
|
// HasShare returns a boolean if a field has been set.
|
|
func (o *DatasetRiskDataset) HasShare() bool {
|
|
if o != nil && !IsNil(o.Share) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetShare gets a reference to the given int64 and assigns it to the Share field.
|
|
func (o *DatasetRiskDataset) SetShare(v int64) {
|
|
o.Share = &v
|
|
}
|
|
|
|
// GetSpec returns the Spec field value if set, zero value otherwise.
|
|
func (o *DatasetRiskDataset) GetSpec() DatasetRiskDatasetSpec {
|
|
if o == nil || IsNil(o.Spec) {
|
|
var ret DatasetRiskDatasetSpec
|
|
return ret
|
|
}
|
|
return *o.Spec
|
|
}
|
|
|
|
// GetSpecOk returns a tuple with the Spec field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *DatasetRiskDataset) GetSpecOk() (*DatasetRiskDatasetSpec, bool) {
|
|
if o == nil || IsNil(o.Spec) {
|
|
return nil, false
|
|
}
|
|
return o.Spec, true
|
|
}
|
|
|
|
// HasSpec returns a boolean if a field has been set.
|
|
func (o *DatasetRiskDataset) HasSpec() bool {
|
|
if o != nil && !IsNil(o.Spec) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetSpec gets a reference to the given DatasetRiskDatasetSpec and assigns it to the Spec field.
|
|
func (o *DatasetRiskDataset) SetSpec(v DatasetRiskDatasetSpec) {
|
|
o.Spec = &v
|
|
}
|
|
|
|
// GetStatus returns the Status field value if set, zero value otherwise.
|
|
func (o *DatasetRiskDataset) GetStatus() string {
|
|
if o == nil || IsNil(o.Status) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Status
|
|
}
|
|
|
|
// GetStatusOk returns a tuple with the Status field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *DatasetRiskDataset) GetStatusOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Status) {
|
|
return nil, false
|
|
}
|
|
return o.Status, true
|
|
}
|
|
|
|
// HasStatus returns a boolean if a field has been set.
|
|
func (o *DatasetRiskDataset) HasStatus() bool {
|
|
if o != nil && !IsNil(o.Status) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetStatus gets a reference to the given string and assigns it to the Status field.
|
|
func (o *DatasetRiskDataset) SetStatus(v string) {
|
|
o.Status = &v
|
|
}
|
|
|
|
// GetTruncated returns the Truncated field value if set, zero value otherwise.
|
|
func (o *DatasetRiskDataset) GetTruncated() bool {
|
|
if o == nil || IsNil(o.Truncated) {
|
|
var ret bool
|
|
return ret
|
|
}
|
|
return *o.Truncated
|
|
}
|
|
|
|
// GetTruncatedOk returns a tuple with the Truncated field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *DatasetRiskDataset) GetTruncatedOk() (*bool, bool) {
|
|
if o == nil || IsNil(o.Truncated) {
|
|
return nil, false
|
|
}
|
|
return o.Truncated, true
|
|
}
|
|
|
|
// HasTruncated returns a boolean if a field has been set.
|
|
func (o *DatasetRiskDataset) HasTruncated() bool {
|
|
if o != nil && !IsNil(o.Truncated) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetTruncated gets a reference to the given bool and assigns it to the Truncated field.
|
|
func (o *DatasetRiskDataset) SetTruncated(v bool) {
|
|
o.Truncated = &v
|
|
}
|
|
|
|
// GetVersion returns the Version field value if set, zero value otherwise.
|
|
func (o *DatasetRiskDataset) GetVersion() int64 {
|
|
if o == nil || IsNil(o.Version) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.Version
|
|
}
|
|
|
|
// GetVersionOk returns a tuple with the Version field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *DatasetRiskDataset) GetVersionOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.Version) {
|
|
return nil, false
|
|
}
|
|
return o.Version, true
|
|
}
|
|
|
|
// HasVersion returns a boolean if a field has been set.
|
|
func (o *DatasetRiskDataset) HasVersion() bool {
|
|
if o != nil && !IsNil(o.Version) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetVersion gets a reference to the given int64 and assigns it to the Version field.
|
|
func (o *DatasetRiskDataset) SetVersion(v int64) {
|
|
o.Version = &v
|
|
}
|
|
|
|
func (o DatasetRiskDataset) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o DatasetRiskDataset) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.At) {
|
|
toSerialize["at"] = o.At
|
|
}
|
|
if !IsNil(o.By) {
|
|
toSerialize["by"] = o.By
|
|
}
|
|
if !IsNil(o.Counts) {
|
|
toSerialize["counts"] = o.Counts
|
|
}
|
|
if !IsNil(o.Digest) {
|
|
toSerialize["digest"] = o.Digest
|
|
}
|
|
if !IsNil(o.Name) {
|
|
toSerialize["name"] = o.Name
|
|
}
|
|
if !IsNil(o.Oversize) {
|
|
toSerialize["oversize"] = o.Oversize
|
|
}
|
|
if !IsNil(o.Refusal) {
|
|
toSerialize["refusal"] = o.Refusal
|
|
}
|
|
if !IsNil(o.Running) {
|
|
toSerialize["running"] = o.Running
|
|
}
|
|
if !IsNil(o.Share) {
|
|
toSerialize["share"] = o.Share
|
|
}
|
|
if !IsNil(o.Spec) {
|
|
toSerialize["spec"] = o.Spec
|
|
}
|
|
if !IsNil(o.Status) {
|
|
toSerialize["status"] = o.Status
|
|
}
|
|
if !IsNil(o.Truncated) {
|
|
toSerialize["truncated"] = o.Truncated
|
|
}
|
|
if !IsNil(o.Version) {
|
|
toSerialize["version"] = o.Version
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *DatasetRiskDataset) UnmarshalJSON(data []byte) (err error) {
|
|
varDatasetRiskDataset := _DatasetRiskDataset{}
|
|
|
|
err = json.Unmarshal(data, &varDatasetRiskDataset)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = DatasetRiskDataset(varDatasetRiskDataset)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "at")
|
|
delete(additionalProperties, "by")
|
|
delete(additionalProperties, "counts")
|
|
delete(additionalProperties, "digest")
|
|
delete(additionalProperties, "name")
|
|
delete(additionalProperties, "oversize")
|
|
delete(additionalProperties, "refusal")
|
|
delete(additionalProperties, "running")
|
|
delete(additionalProperties, "share")
|
|
delete(additionalProperties, "spec")
|
|
delete(additionalProperties, "status")
|
|
delete(additionalProperties, "truncated")
|
|
delete(additionalProperties, "version")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableDatasetRiskDataset struct {
|
|
value *DatasetRiskDataset
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableDatasetRiskDataset) Get() *DatasetRiskDataset {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableDatasetRiskDataset) Set(val *DatasetRiskDataset) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableDatasetRiskDataset) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableDatasetRiskDataset) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableDatasetRiskDataset(val *DatasetRiskDataset) *NullableDatasetRiskDataset {
|
|
return &NullableDatasetRiskDataset{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableDatasetRiskDataset) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableDatasetRiskDataset) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|