mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
383 lines
11 KiB
Go
383 lines
11 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 DatasetRiskDatasetRows type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &DatasetRiskDatasetRows{}
|
|
|
|
// DatasetRiskDatasetRows struct for DatasetRiskDatasetRows
|
|
type DatasetRiskDatasetRows struct {
|
|
// Dataset is the dataset the page was read from.
|
|
Dataset *string `json:"dataset,omitempty"`
|
|
// Digest is the version's fingerprint. An exported page that did not carry it would be bytes with no way to say which dataset they are.
|
|
Digest *string `json:"digest,omitempty"`
|
|
// Dims names what each coordinate of Point means, in Point's own order.
|
|
Dims []string `json:"dims,omitempty"`
|
|
// Limit is the page size actually served: the one asked for, clamped to the plane's own bound of 5000. Fewer rows than Limit means the version ended.
|
|
Limit *int64 `json:"limit,omitempty"`
|
|
// Offset is where this page starts in the version's own row order, which is by row id and therefore stable forever.
|
|
Offset *int64 `json:"offset,omitempty"`
|
|
// Rows is the page. Never null.
|
|
Rows []DatasetRiskDatasetRow `json:"rows,omitempty"`
|
|
// Version is which published version it was read from — the one asked for, or the newest published one when the request named none.
|
|
Version *int64 `json:"version,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _DatasetRiskDatasetRows DatasetRiskDatasetRows
|
|
|
|
// NewDatasetRiskDatasetRows instantiates a new DatasetRiskDatasetRows 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 NewDatasetRiskDatasetRows() *DatasetRiskDatasetRows {
|
|
this := DatasetRiskDatasetRows{}
|
|
return &this
|
|
}
|
|
|
|
// NewDatasetRiskDatasetRowsWithDefaults instantiates a new DatasetRiskDatasetRows 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 NewDatasetRiskDatasetRowsWithDefaults() *DatasetRiskDatasetRows {
|
|
this := DatasetRiskDatasetRows{}
|
|
return &this
|
|
}
|
|
|
|
// GetDataset returns the Dataset field value if set, zero value otherwise.
|
|
func (o *DatasetRiskDatasetRows) GetDataset() string {
|
|
if o == nil || IsNil(o.Dataset) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Dataset
|
|
}
|
|
|
|
// GetDatasetOk returns a tuple with the Dataset field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *DatasetRiskDatasetRows) GetDatasetOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Dataset) {
|
|
return nil, false
|
|
}
|
|
return o.Dataset, true
|
|
}
|
|
|
|
// HasDataset returns a boolean if a field has been set.
|
|
func (o *DatasetRiskDatasetRows) HasDataset() bool {
|
|
if o != nil && !IsNil(o.Dataset) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetDataset gets a reference to the given string and assigns it to the Dataset field.
|
|
func (o *DatasetRiskDatasetRows) SetDataset(v string) {
|
|
o.Dataset = &v
|
|
}
|
|
|
|
// GetDigest returns the Digest field value if set, zero value otherwise.
|
|
func (o *DatasetRiskDatasetRows) 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 *DatasetRiskDatasetRows) 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 *DatasetRiskDatasetRows) 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 *DatasetRiskDatasetRows) SetDigest(v string) {
|
|
o.Digest = &v
|
|
}
|
|
|
|
// GetDims returns the Dims field value if set, zero value otherwise.
|
|
func (o *DatasetRiskDatasetRows) GetDims() []string {
|
|
if o == nil || IsNil(o.Dims) {
|
|
var ret []string
|
|
return ret
|
|
}
|
|
return o.Dims
|
|
}
|
|
|
|
// GetDimsOk returns a tuple with the Dims field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *DatasetRiskDatasetRows) GetDimsOk() ([]string, bool) {
|
|
if o == nil || IsNil(o.Dims) {
|
|
return nil, false
|
|
}
|
|
return o.Dims, true
|
|
}
|
|
|
|
// HasDims returns a boolean if a field has been set.
|
|
func (o *DatasetRiskDatasetRows) HasDims() bool {
|
|
if o != nil && !IsNil(o.Dims) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetDims gets a reference to the given []string and assigns it to the Dims field.
|
|
func (o *DatasetRiskDatasetRows) SetDims(v []string) {
|
|
o.Dims = v
|
|
}
|
|
|
|
// GetLimit returns the Limit field value if set, zero value otherwise.
|
|
func (o *DatasetRiskDatasetRows) GetLimit() int64 {
|
|
if o == nil || IsNil(o.Limit) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.Limit
|
|
}
|
|
|
|
// GetLimitOk returns a tuple with the Limit field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *DatasetRiskDatasetRows) GetLimitOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.Limit) {
|
|
return nil, false
|
|
}
|
|
return o.Limit, true
|
|
}
|
|
|
|
// HasLimit returns a boolean if a field has been set.
|
|
func (o *DatasetRiskDatasetRows) HasLimit() bool {
|
|
if o != nil && !IsNil(o.Limit) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetLimit gets a reference to the given int64 and assigns it to the Limit field.
|
|
func (o *DatasetRiskDatasetRows) SetLimit(v int64) {
|
|
o.Limit = &v
|
|
}
|
|
|
|
// GetOffset returns the Offset field value if set, zero value otherwise.
|
|
func (o *DatasetRiskDatasetRows) GetOffset() int64 {
|
|
if o == nil || IsNil(o.Offset) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.Offset
|
|
}
|
|
|
|
// GetOffsetOk returns a tuple with the Offset field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *DatasetRiskDatasetRows) GetOffsetOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.Offset) {
|
|
return nil, false
|
|
}
|
|
return o.Offset, true
|
|
}
|
|
|
|
// HasOffset returns a boolean if a field has been set.
|
|
func (o *DatasetRiskDatasetRows) HasOffset() bool {
|
|
if o != nil && !IsNil(o.Offset) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetOffset gets a reference to the given int64 and assigns it to the Offset field.
|
|
func (o *DatasetRiskDatasetRows) SetOffset(v int64) {
|
|
o.Offset = &v
|
|
}
|
|
|
|
// GetRows returns the Rows field value if set, zero value otherwise.
|
|
func (o *DatasetRiskDatasetRows) GetRows() []DatasetRiskDatasetRow {
|
|
if o == nil || IsNil(o.Rows) {
|
|
var ret []DatasetRiskDatasetRow
|
|
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 *DatasetRiskDatasetRows) GetRowsOk() ([]DatasetRiskDatasetRow, 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 *DatasetRiskDatasetRows) HasRows() bool {
|
|
if o != nil && !IsNil(o.Rows) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetRows gets a reference to the given []DatasetRiskDatasetRow and assigns it to the Rows field.
|
|
func (o *DatasetRiskDatasetRows) SetRows(v []DatasetRiskDatasetRow) {
|
|
o.Rows = v
|
|
}
|
|
|
|
// GetVersion returns the Version field value if set, zero value otherwise.
|
|
func (o *DatasetRiskDatasetRows) 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 *DatasetRiskDatasetRows) 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 *DatasetRiskDatasetRows) 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 *DatasetRiskDatasetRows) SetVersion(v int64) {
|
|
o.Version = &v
|
|
}
|
|
|
|
func (o DatasetRiskDatasetRows) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o DatasetRiskDatasetRows) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Dataset) {
|
|
toSerialize["dataset"] = o.Dataset
|
|
}
|
|
if !IsNil(o.Digest) {
|
|
toSerialize["digest"] = o.Digest
|
|
}
|
|
if !IsNil(o.Dims) {
|
|
toSerialize["dims"] = o.Dims
|
|
}
|
|
if !IsNil(o.Limit) {
|
|
toSerialize["limit"] = o.Limit
|
|
}
|
|
if !IsNil(o.Offset) {
|
|
toSerialize["offset"] = o.Offset
|
|
}
|
|
if !IsNil(o.Rows) {
|
|
toSerialize["rows"] = o.Rows
|
|
}
|
|
if !IsNil(o.Version) {
|
|
toSerialize["version"] = o.Version
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *DatasetRiskDatasetRows) UnmarshalJSON(data []byte) (err error) {
|
|
varDatasetRiskDatasetRows := _DatasetRiskDatasetRows{}
|
|
|
|
err = json.Unmarshal(data, &varDatasetRiskDatasetRows)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = DatasetRiskDatasetRows(varDatasetRiskDatasetRows)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "dataset")
|
|
delete(additionalProperties, "digest")
|
|
delete(additionalProperties, "dims")
|
|
delete(additionalProperties, "limit")
|
|
delete(additionalProperties, "offset")
|
|
delete(additionalProperties, "rows")
|
|
delete(additionalProperties, "version")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableDatasetRiskDatasetRows struct {
|
|
value *DatasetRiskDatasetRows
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableDatasetRiskDatasetRows) Get() *DatasetRiskDatasetRows {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableDatasetRiskDatasetRows) Set(val *DatasetRiskDatasetRows) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableDatasetRiskDatasetRows) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableDatasetRiskDatasetRows) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableDatasetRiskDatasetRows(val *DatasetRiskDatasetRows) *NullableDatasetRiskDatasetRows {
|
|
return &NullableDatasetRiskDatasetRows{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableDatasetRiskDatasetRows) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableDatasetRiskDatasetRows) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|