mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
345 lines
10 KiB
Go
345 lines
10 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 RiskRiskModelValue type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &RiskRiskModelValue{}
|
|
|
|
// RiskRiskModelValue struct for RiskRiskModelValue
|
|
type RiskRiskModelValue struct {
|
|
// Address names this value by its own content: the model's shape, the geometry seed, its position in the window, its threshold, its masses as IEEE-754 bits and the fold watermark behind them. Nothing else — no clock, no counter and deliberately NOT the organisation, so an identical model has one name and a name is never an authority. Holding another organisation's address resolves nothing.
|
|
Address *string `json:"address,omitempty"`
|
|
// At is when it was published, RFC 3339, on the server clock. You do not supply it: a record whose date the audited party chose is not a record.
|
|
At *string `json:"at,omitempty"`
|
|
// Learned is how many events are behind the masses.
|
|
Learned *int64 `json:"learned,omitempty"`
|
|
// Sequence is this value's place in YOUR organisation's own history, from 1 and contiguous until retention disposes of the oldest.
|
|
Sequence *int64 `json:"sequence,omitempty"`
|
|
// Shape NAMES the model space the masses are only meaningful against, as `<family>:<digest>` — the KIND of model, and that family's own digest over the feature inventory in order and the detector's geometry parameters. Compare it with the `shape` on your model state (GET /v1/risk/state): equal means adopting this value restores masses into the space already running, and different means adopting it REPLANTS the model into the space this value describes. That is what makes a searched shape installable. A DIFFERENT FAMILY IS NOT ADOPTABLE AT ALL, and that is the one difference the family term makes here: a different geometry in the same family is a replant, and a different family is a refusal naming both — its masses do not describe your model in any space.
|
|
Shape *string `json:"shape,omitempty"`
|
|
// Warmed is how far your own event surface had been folded in when this value was published, RFC 3339. It is part of the address because two models with identical masses reached by different routes disagree about what is left to fold, and one of them will re-teach history the other will not.
|
|
Warmed *string `json:"warmed,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _RiskRiskModelValue RiskRiskModelValue
|
|
|
|
// NewRiskRiskModelValue instantiates a new RiskRiskModelValue 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 NewRiskRiskModelValue() *RiskRiskModelValue {
|
|
this := RiskRiskModelValue{}
|
|
return &this
|
|
}
|
|
|
|
// NewRiskRiskModelValueWithDefaults instantiates a new RiskRiskModelValue 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 NewRiskRiskModelValueWithDefaults() *RiskRiskModelValue {
|
|
this := RiskRiskModelValue{}
|
|
return &this
|
|
}
|
|
|
|
// GetAddress returns the Address field value if set, zero value otherwise.
|
|
func (o *RiskRiskModelValue) GetAddress() string {
|
|
if o == nil || IsNil(o.Address) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Address
|
|
}
|
|
|
|
// GetAddressOk returns a tuple with the Address field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *RiskRiskModelValue) GetAddressOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Address) {
|
|
return nil, false
|
|
}
|
|
return o.Address, true
|
|
}
|
|
|
|
// HasAddress returns a boolean if a field has been set.
|
|
func (o *RiskRiskModelValue) HasAddress() bool {
|
|
if o != nil && !IsNil(o.Address) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetAddress gets a reference to the given string and assigns it to the Address field.
|
|
func (o *RiskRiskModelValue) SetAddress(v string) {
|
|
o.Address = &v
|
|
}
|
|
|
|
// GetAt returns the At field value if set, zero value otherwise.
|
|
func (o *RiskRiskModelValue) 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 *RiskRiskModelValue) 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 *RiskRiskModelValue) 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 *RiskRiskModelValue) SetAt(v string) {
|
|
o.At = &v
|
|
}
|
|
|
|
// GetLearned returns the Learned field value if set, zero value otherwise.
|
|
func (o *RiskRiskModelValue) GetLearned() int64 {
|
|
if o == nil || IsNil(o.Learned) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.Learned
|
|
}
|
|
|
|
// GetLearnedOk returns a tuple with the Learned field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *RiskRiskModelValue) GetLearnedOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.Learned) {
|
|
return nil, false
|
|
}
|
|
return o.Learned, true
|
|
}
|
|
|
|
// HasLearned returns a boolean if a field has been set.
|
|
func (o *RiskRiskModelValue) HasLearned() bool {
|
|
if o != nil && !IsNil(o.Learned) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetLearned gets a reference to the given int64 and assigns it to the Learned field.
|
|
func (o *RiskRiskModelValue) SetLearned(v int64) {
|
|
o.Learned = &v
|
|
}
|
|
|
|
// GetSequence returns the Sequence field value if set, zero value otherwise.
|
|
func (o *RiskRiskModelValue) GetSequence() int64 {
|
|
if o == nil || IsNil(o.Sequence) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.Sequence
|
|
}
|
|
|
|
// GetSequenceOk returns a tuple with the Sequence field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *RiskRiskModelValue) GetSequenceOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.Sequence) {
|
|
return nil, false
|
|
}
|
|
return o.Sequence, true
|
|
}
|
|
|
|
// HasSequence returns a boolean if a field has been set.
|
|
func (o *RiskRiskModelValue) HasSequence() bool {
|
|
if o != nil && !IsNil(o.Sequence) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetSequence gets a reference to the given int64 and assigns it to the Sequence field.
|
|
func (o *RiskRiskModelValue) SetSequence(v int64) {
|
|
o.Sequence = &v
|
|
}
|
|
|
|
// GetShape returns the Shape field value if set, zero value otherwise.
|
|
func (o *RiskRiskModelValue) GetShape() string {
|
|
if o == nil || IsNil(o.Shape) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Shape
|
|
}
|
|
|
|
// GetShapeOk returns a tuple with the Shape field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *RiskRiskModelValue) GetShapeOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Shape) {
|
|
return nil, false
|
|
}
|
|
return o.Shape, true
|
|
}
|
|
|
|
// HasShape returns a boolean if a field has been set.
|
|
func (o *RiskRiskModelValue) HasShape() bool {
|
|
if o != nil && !IsNil(o.Shape) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetShape gets a reference to the given string and assigns it to the Shape field.
|
|
func (o *RiskRiskModelValue) SetShape(v string) {
|
|
o.Shape = &v
|
|
}
|
|
|
|
// GetWarmed returns the Warmed field value if set, zero value otherwise.
|
|
func (o *RiskRiskModelValue) GetWarmed() string {
|
|
if o == nil || IsNil(o.Warmed) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Warmed
|
|
}
|
|
|
|
// GetWarmedOk returns a tuple with the Warmed field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *RiskRiskModelValue) GetWarmedOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Warmed) {
|
|
return nil, false
|
|
}
|
|
return o.Warmed, true
|
|
}
|
|
|
|
// HasWarmed returns a boolean if a field has been set.
|
|
func (o *RiskRiskModelValue) HasWarmed() bool {
|
|
if o != nil && !IsNil(o.Warmed) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetWarmed gets a reference to the given string and assigns it to the Warmed field.
|
|
func (o *RiskRiskModelValue) SetWarmed(v string) {
|
|
o.Warmed = &v
|
|
}
|
|
|
|
func (o RiskRiskModelValue) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o RiskRiskModelValue) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Address) {
|
|
toSerialize["address"] = o.Address
|
|
}
|
|
if !IsNil(o.At) {
|
|
toSerialize["at"] = o.At
|
|
}
|
|
if !IsNil(o.Learned) {
|
|
toSerialize["learned"] = o.Learned
|
|
}
|
|
if !IsNil(o.Sequence) {
|
|
toSerialize["sequence"] = o.Sequence
|
|
}
|
|
if !IsNil(o.Shape) {
|
|
toSerialize["shape"] = o.Shape
|
|
}
|
|
if !IsNil(o.Warmed) {
|
|
toSerialize["warmed"] = o.Warmed
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *RiskRiskModelValue) UnmarshalJSON(data []byte) (err error) {
|
|
varRiskRiskModelValue := _RiskRiskModelValue{}
|
|
|
|
err = json.Unmarshal(data, &varRiskRiskModelValue)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = RiskRiskModelValue(varRiskRiskModelValue)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "address")
|
|
delete(additionalProperties, "at")
|
|
delete(additionalProperties, "learned")
|
|
delete(additionalProperties, "sequence")
|
|
delete(additionalProperties, "shape")
|
|
delete(additionalProperties, "warmed")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableRiskRiskModelValue struct {
|
|
value *RiskRiskModelValue
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableRiskRiskModelValue) Get() *RiskRiskModelValue {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableRiskRiskModelValue) Set(val *RiskRiskModelValue) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableRiskRiskModelValue) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableRiskRiskModelValue) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableRiskRiskModelValue(val *RiskRiskModelValue) *NullableRiskRiskModelValue {
|
|
return &NullableRiskRiskModelValue{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableRiskRiskModelValue) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableRiskRiskModelValue) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|