mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
801 lines
25 KiB
Go
801 lines
25 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 RiskRiskModelState type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &RiskRiskModelState{}
|
|
|
|
// RiskRiskModelState struct for RiskRiskModelState
|
|
type RiskRiskModelState struct {
|
|
// Aggregates reports the pressure on this organisation's own sliding aggregates, and whether they have started forgetting subjects to stay inside their bound.
|
|
Aggregates *RiskRiskAggregates `json:"aggregates,omitempty"`
|
|
// Blind counts, per feature, how often it took its neutral value for want of data. A feature blind on most traffic is not contributing whatever the inventory claims for it.
|
|
Blind map[string]int64 `json:"blind,omitempty"`
|
|
// Cut is the threshold in force, derived from Stated as a quantile of the scores actually observed.
|
|
Cut *float64 `json:"cut,omitempty"`
|
|
// Descends is the published value the working model grew out of: the newest one whose mass count it has reached or passed. Empty when nothing has been published yet. It is DERIVED from the count and never stored, so an instant rollback is right for free — adopting an older value moves the count backward and this answers with that older value, where a stored pointer would be a second fact to keep in step. Read with Learned it is also the DRIFT: this model is Descends plus however many events the two counts differ by.
|
|
Descends *string `json:"descends,omitempty"`
|
|
// Disposed is how many published values retention has taken. It is DERIVED from the lowest surviving sequence, so it cannot drift from what it describes, and it is reported because a retention that binds is a fact an operator must be able to read rather than a silence.
|
|
Disposed *int64 `json:"disposed,omitempty"`
|
|
// Learned is how many events the model has learned from.
|
|
Learned *int64 `json:"learned,omitempty"`
|
|
// Live is false while the model is in shadow — scoring, learning and recording what it WOULD have alerted on, and changing no outcome. Shadow is the default for a new tenant.
|
|
Live *bool `json:"live,omitempty"`
|
|
// Policy is the version of the decision regime this model is deciding under, from your organisation's own policy history (GET /v1/risk/policy). Every score cites it, so it is the join between a past decision and the appetite that produced its threshold. Zero means no regime has ever been stated and the default posture — shadow — is in force.
|
|
Policy *int64 `json:"policy,omitempty"`
|
|
// Realised is the share that actually was. Reading it beside Stated is what makes the appetite a measured commitment rather than an intention.
|
|
Realised *float64 `json:"realised,omitempty"`
|
|
// Refused counts events the model would not score, by reason. None of them was examined; a refusal is counted, never silent.
|
|
Refused map[string]int64 `json:"refused,omitempty"`
|
|
// Sample is the share of below-the-line events retained for review, which is how the miss rate is measured rather than assumed.
|
|
Sample *float64 `json:"sample,omitempty"`
|
|
// Saturated means no threshold can honour the stated appetite because too much of the stream scores in the top bucket, so the model is alerting on nothing — the one state that must never be mistaken for quiet.
|
|
Saturated *bool `json:"saturated,omitempty"`
|
|
// Shape is the model's identity, as `<family>:<digest>`: the KIND of model, and that family's own digest over the inventory in order and the detector's geometry parameters. It is what an auditor pins an alert to, because learned state is only meaningful against the space that produced it — and the family leads it because two families' masses are not fitted differently, they are different kinds of number.
|
|
Shape *string `json:"shape,omitempty"`
|
|
// Stated is the share of the stream this organisation said may be examined.
|
|
Stated *float64 `json:"stated,omitempty"`
|
|
// Surface reports what of the tenant's OWN event surface has been folded in.
|
|
Surface *RiskRiskSurface `json:"surface,omitempty"`
|
|
// Tenant is the qualified key the model is held under — the brand whose issuer vouched for the caller and the organisation it acts for. It is echoed so a reader can see the answer is its own and not a parameter it passed.
|
|
Tenant *string `json:"tenant,omitempty"`
|
|
// Values is your organisation's own published model values, newest first — every state it deliberately named, each addressed by its own content and immutable. This is what PUT /v1/risk/state/model names, so it is reported HERE rather than behind an address of its own: they are part of what a review of one model reads, and a list of names is a few hundred bytes. Compare each one's `shape` with the `shape` above: equal means adopting it restores masses into the space this model already runs, and different means adopting it REPLANTS the model into the space that value describes — which is how the shape a search found becomes the shape you are running. The working model is NOT in it. Publication is a boundary somebody marked; the state between two boundaries is in-process counters, and calling those a value would be a claim about reproducibility that nothing could honour.
|
|
Values []RiskRiskModelValue `json:"values,omitempty"`
|
|
// Warm is whether that is enough for the model to have an opinion at all. Below it the model declines to score, which is an ordinary state and is not a clean bill of health.
|
|
Warm *bool `json:"warm,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _RiskRiskModelState RiskRiskModelState
|
|
|
|
// NewRiskRiskModelState instantiates a new RiskRiskModelState 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 NewRiskRiskModelState() *RiskRiskModelState {
|
|
this := RiskRiskModelState{}
|
|
return &this
|
|
}
|
|
|
|
// NewRiskRiskModelStateWithDefaults instantiates a new RiskRiskModelState 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 NewRiskRiskModelStateWithDefaults() *RiskRiskModelState {
|
|
this := RiskRiskModelState{}
|
|
return &this
|
|
}
|
|
|
|
// GetAggregates returns the Aggregates field value if set, zero value otherwise.
|
|
func (o *RiskRiskModelState) GetAggregates() RiskRiskAggregates {
|
|
if o == nil || IsNil(o.Aggregates) {
|
|
var ret RiskRiskAggregates
|
|
return ret
|
|
}
|
|
return *o.Aggregates
|
|
}
|
|
|
|
// GetAggregatesOk returns a tuple with the Aggregates field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *RiskRiskModelState) GetAggregatesOk() (*RiskRiskAggregates, bool) {
|
|
if o == nil || IsNil(o.Aggregates) {
|
|
return nil, false
|
|
}
|
|
return o.Aggregates, true
|
|
}
|
|
|
|
// HasAggregates returns a boolean if a field has been set.
|
|
func (o *RiskRiskModelState) HasAggregates() bool {
|
|
if o != nil && !IsNil(o.Aggregates) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetAggregates gets a reference to the given RiskRiskAggregates and assigns it to the Aggregates field.
|
|
func (o *RiskRiskModelState) SetAggregates(v RiskRiskAggregates) {
|
|
o.Aggregates = &v
|
|
}
|
|
|
|
// GetBlind returns the Blind field value if set, zero value otherwise.
|
|
func (o *RiskRiskModelState) GetBlind() map[string]int64 {
|
|
if o == nil || IsNil(o.Blind) {
|
|
var ret map[string]int64
|
|
return ret
|
|
}
|
|
return o.Blind
|
|
}
|
|
|
|
// GetBlindOk returns a tuple with the Blind field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *RiskRiskModelState) GetBlindOk() (map[string]int64, bool) {
|
|
if o == nil || IsNil(o.Blind) {
|
|
return map[string]int64{}, false
|
|
}
|
|
return o.Blind, true
|
|
}
|
|
|
|
// HasBlind returns a boolean if a field has been set.
|
|
func (o *RiskRiskModelState) HasBlind() bool {
|
|
if o != nil && !IsNil(o.Blind) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetBlind gets a reference to the given map[string]int64 and assigns it to the Blind field.
|
|
func (o *RiskRiskModelState) SetBlind(v map[string]int64) {
|
|
o.Blind = v
|
|
}
|
|
|
|
// GetCut returns the Cut field value if set, zero value otherwise.
|
|
func (o *RiskRiskModelState) GetCut() float64 {
|
|
if o == nil || IsNil(o.Cut) {
|
|
var ret float64
|
|
return ret
|
|
}
|
|
return *o.Cut
|
|
}
|
|
|
|
// GetCutOk returns a tuple with the Cut field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *RiskRiskModelState) GetCutOk() (*float64, bool) {
|
|
if o == nil || IsNil(o.Cut) {
|
|
return nil, false
|
|
}
|
|
return o.Cut, true
|
|
}
|
|
|
|
// HasCut returns a boolean if a field has been set.
|
|
func (o *RiskRiskModelState) HasCut() bool {
|
|
if o != nil && !IsNil(o.Cut) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetCut gets a reference to the given float64 and assigns it to the Cut field.
|
|
func (o *RiskRiskModelState) SetCut(v float64) {
|
|
o.Cut = &v
|
|
}
|
|
|
|
// GetDescends returns the Descends field value if set, zero value otherwise.
|
|
func (o *RiskRiskModelState) GetDescends() string {
|
|
if o == nil || IsNil(o.Descends) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Descends
|
|
}
|
|
|
|
// GetDescendsOk returns a tuple with the Descends field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *RiskRiskModelState) GetDescendsOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Descends) {
|
|
return nil, false
|
|
}
|
|
return o.Descends, true
|
|
}
|
|
|
|
// HasDescends returns a boolean if a field has been set.
|
|
func (o *RiskRiskModelState) HasDescends() bool {
|
|
if o != nil && !IsNil(o.Descends) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetDescends gets a reference to the given string and assigns it to the Descends field.
|
|
func (o *RiskRiskModelState) SetDescends(v string) {
|
|
o.Descends = &v
|
|
}
|
|
|
|
// GetDisposed returns the Disposed field value if set, zero value otherwise.
|
|
func (o *RiskRiskModelState) GetDisposed() int64 {
|
|
if o == nil || IsNil(o.Disposed) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.Disposed
|
|
}
|
|
|
|
// GetDisposedOk returns a tuple with the Disposed field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *RiskRiskModelState) GetDisposedOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.Disposed) {
|
|
return nil, false
|
|
}
|
|
return o.Disposed, true
|
|
}
|
|
|
|
// HasDisposed returns a boolean if a field has been set.
|
|
func (o *RiskRiskModelState) HasDisposed() bool {
|
|
if o != nil && !IsNil(o.Disposed) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetDisposed gets a reference to the given int64 and assigns it to the Disposed field.
|
|
func (o *RiskRiskModelState) SetDisposed(v int64) {
|
|
o.Disposed = &v
|
|
}
|
|
|
|
// GetLearned returns the Learned field value if set, zero value otherwise.
|
|
func (o *RiskRiskModelState) 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 *RiskRiskModelState) 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 *RiskRiskModelState) 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 *RiskRiskModelState) SetLearned(v int64) {
|
|
o.Learned = &v
|
|
}
|
|
|
|
// GetLive returns the Live field value if set, zero value otherwise.
|
|
func (o *RiskRiskModelState) GetLive() bool {
|
|
if o == nil || IsNil(o.Live) {
|
|
var ret bool
|
|
return ret
|
|
}
|
|
return *o.Live
|
|
}
|
|
|
|
// GetLiveOk returns a tuple with the Live field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *RiskRiskModelState) GetLiveOk() (*bool, bool) {
|
|
if o == nil || IsNil(o.Live) {
|
|
return nil, false
|
|
}
|
|
return o.Live, true
|
|
}
|
|
|
|
// HasLive returns a boolean if a field has been set.
|
|
func (o *RiskRiskModelState) HasLive() bool {
|
|
if o != nil && !IsNil(o.Live) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetLive gets a reference to the given bool and assigns it to the Live field.
|
|
func (o *RiskRiskModelState) SetLive(v bool) {
|
|
o.Live = &v
|
|
}
|
|
|
|
// GetPolicy returns the Policy field value if set, zero value otherwise.
|
|
func (o *RiskRiskModelState) GetPolicy() int64 {
|
|
if o == nil || IsNil(o.Policy) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.Policy
|
|
}
|
|
|
|
// GetPolicyOk returns a tuple with the Policy field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *RiskRiskModelState) GetPolicyOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.Policy) {
|
|
return nil, false
|
|
}
|
|
return o.Policy, true
|
|
}
|
|
|
|
// HasPolicy returns a boolean if a field has been set.
|
|
func (o *RiskRiskModelState) HasPolicy() bool {
|
|
if o != nil && !IsNil(o.Policy) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetPolicy gets a reference to the given int64 and assigns it to the Policy field.
|
|
func (o *RiskRiskModelState) SetPolicy(v int64) {
|
|
o.Policy = &v
|
|
}
|
|
|
|
// GetRealised returns the Realised field value if set, zero value otherwise.
|
|
func (o *RiskRiskModelState) GetRealised() float64 {
|
|
if o == nil || IsNil(o.Realised) {
|
|
var ret float64
|
|
return ret
|
|
}
|
|
return *o.Realised
|
|
}
|
|
|
|
// GetRealisedOk returns a tuple with the Realised field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *RiskRiskModelState) GetRealisedOk() (*float64, bool) {
|
|
if o == nil || IsNil(o.Realised) {
|
|
return nil, false
|
|
}
|
|
return o.Realised, true
|
|
}
|
|
|
|
// HasRealised returns a boolean if a field has been set.
|
|
func (o *RiskRiskModelState) HasRealised() bool {
|
|
if o != nil && !IsNil(o.Realised) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetRealised gets a reference to the given float64 and assigns it to the Realised field.
|
|
func (o *RiskRiskModelState) SetRealised(v float64) {
|
|
o.Realised = &v
|
|
}
|
|
|
|
// GetRefused returns the Refused field value if set, zero value otherwise.
|
|
func (o *RiskRiskModelState) GetRefused() map[string]int64 {
|
|
if o == nil || IsNil(o.Refused) {
|
|
var ret map[string]int64
|
|
return ret
|
|
}
|
|
return o.Refused
|
|
}
|
|
|
|
// GetRefusedOk returns a tuple with the Refused field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *RiskRiskModelState) GetRefusedOk() (map[string]int64, bool) {
|
|
if o == nil || IsNil(o.Refused) {
|
|
return map[string]int64{}, false
|
|
}
|
|
return o.Refused, true
|
|
}
|
|
|
|
// HasRefused returns a boolean if a field has been set.
|
|
func (o *RiskRiskModelState) HasRefused() bool {
|
|
if o != nil && !IsNil(o.Refused) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetRefused gets a reference to the given map[string]int64 and assigns it to the Refused field.
|
|
func (o *RiskRiskModelState) SetRefused(v map[string]int64) {
|
|
o.Refused = v
|
|
}
|
|
|
|
// GetSample returns the Sample field value if set, zero value otherwise.
|
|
func (o *RiskRiskModelState) GetSample() float64 {
|
|
if o == nil || IsNil(o.Sample) {
|
|
var ret float64
|
|
return ret
|
|
}
|
|
return *o.Sample
|
|
}
|
|
|
|
// GetSampleOk returns a tuple with the Sample field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *RiskRiskModelState) GetSampleOk() (*float64, bool) {
|
|
if o == nil || IsNil(o.Sample) {
|
|
return nil, false
|
|
}
|
|
return o.Sample, true
|
|
}
|
|
|
|
// HasSample returns a boolean if a field has been set.
|
|
func (o *RiskRiskModelState) HasSample() bool {
|
|
if o != nil && !IsNil(o.Sample) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetSample gets a reference to the given float64 and assigns it to the Sample field.
|
|
func (o *RiskRiskModelState) SetSample(v float64) {
|
|
o.Sample = &v
|
|
}
|
|
|
|
// GetSaturated returns the Saturated field value if set, zero value otherwise.
|
|
func (o *RiskRiskModelState) GetSaturated() bool {
|
|
if o == nil || IsNil(o.Saturated) {
|
|
var ret bool
|
|
return ret
|
|
}
|
|
return *o.Saturated
|
|
}
|
|
|
|
// GetSaturatedOk returns a tuple with the Saturated field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *RiskRiskModelState) GetSaturatedOk() (*bool, bool) {
|
|
if o == nil || IsNil(o.Saturated) {
|
|
return nil, false
|
|
}
|
|
return o.Saturated, true
|
|
}
|
|
|
|
// HasSaturated returns a boolean if a field has been set.
|
|
func (o *RiskRiskModelState) HasSaturated() bool {
|
|
if o != nil && !IsNil(o.Saturated) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetSaturated gets a reference to the given bool and assigns it to the Saturated field.
|
|
func (o *RiskRiskModelState) SetSaturated(v bool) {
|
|
o.Saturated = &v
|
|
}
|
|
|
|
// GetShape returns the Shape field value if set, zero value otherwise.
|
|
func (o *RiskRiskModelState) 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 *RiskRiskModelState) 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 *RiskRiskModelState) 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 *RiskRiskModelState) SetShape(v string) {
|
|
o.Shape = &v
|
|
}
|
|
|
|
// GetStated returns the Stated field value if set, zero value otherwise.
|
|
func (o *RiskRiskModelState) GetStated() float64 {
|
|
if o == nil || IsNil(o.Stated) {
|
|
var ret float64
|
|
return ret
|
|
}
|
|
return *o.Stated
|
|
}
|
|
|
|
// GetStatedOk returns a tuple with the Stated field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *RiskRiskModelState) GetStatedOk() (*float64, bool) {
|
|
if o == nil || IsNil(o.Stated) {
|
|
return nil, false
|
|
}
|
|
return o.Stated, true
|
|
}
|
|
|
|
// HasStated returns a boolean if a field has been set.
|
|
func (o *RiskRiskModelState) HasStated() bool {
|
|
if o != nil && !IsNil(o.Stated) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetStated gets a reference to the given float64 and assigns it to the Stated field.
|
|
func (o *RiskRiskModelState) SetStated(v float64) {
|
|
o.Stated = &v
|
|
}
|
|
|
|
// GetSurface returns the Surface field value if set, zero value otherwise.
|
|
func (o *RiskRiskModelState) GetSurface() RiskRiskSurface {
|
|
if o == nil || IsNil(o.Surface) {
|
|
var ret RiskRiskSurface
|
|
return ret
|
|
}
|
|
return *o.Surface
|
|
}
|
|
|
|
// GetSurfaceOk returns a tuple with the Surface field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *RiskRiskModelState) GetSurfaceOk() (*RiskRiskSurface, bool) {
|
|
if o == nil || IsNil(o.Surface) {
|
|
return nil, false
|
|
}
|
|
return o.Surface, true
|
|
}
|
|
|
|
// HasSurface returns a boolean if a field has been set.
|
|
func (o *RiskRiskModelState) HasSurface() bool {
|
|
if o != nil && !IsNil(o.Surface) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetSurface gets a reference to the given RiskRiskSurface and assigns it to the Surface field.
|
|
func (o *RiskRiskModelState) SetSurface(v RiskRiskSurface) {
|
|
o.Surface = &v
|
|
}
|
|
|
|
// GetTenant returns the Tenant field value if set, zero value otherwise.
|
|
func (o *RiskRiskModelState) GetTenant() string {
|
|
if o == nil || IsNil(o.Tenant) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Tenant
|
|
}
|
|
|
|
// GetTenantOk returns a tuple with the Tenant field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *RiskRiskModelState) GetTenantOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Tenant) {
|
|
return nil, false
|
|
}
|
|
return o.Tenant, true
|
|
}
|
|
|
|
// HasTenant returns a boolean if a field has been set.
|
|
func (o *RiskRiskModelState) HasTenant() bool {
|
|
if o != nil && !IsNil(o.Tenant) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetTenant gets a reference to the given string and assigns it to the Tenant field.
|
|
func (o *RiskRiskModelState) SetTenant(v string) {
|
|
o.Tenant = &v
|
|
}
|
|
|
|
// GetValues returns the Values field value if set, zero value otherwise.
|
|
func (o *RiskRiskModelState) GetValues() []RiskRiskModelValue {
|
|
if o == nil || IsNil(o.Values) {
|
|
var ret []RiskRiskModelValue
|
|
return ret
|
|
}
|
|
return o.Values
|
|
}
|
|
|
|
// GetValuesOk returns a tuple with the Values field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *RiskRiskModelState) GetValuesOk() ([]RiskRiskModelValue, bool) {
|
|
if o == nil || IsNil(o.Values) {
|
|
return nil, false
|
|
}
|
|
return o.Values, true
|
|
}
|
|
|
|
// HasValues returns a boolean if a field has been set.
|
|
func (o *RiskRiskModelState) HasValues() bool {
|
|
if o != nil && !IsNil(o.Values) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetValues gets a reference to the given []RiskRiskModelValue and assigns it to the Values field.
|
|
func (o *RiskRiskModelState) SetValues(v []RiskRiskModelValue) {
|
|
o.Values = v
|
|
}
|
|
|
|
// GetWarm returns the Warm field value if set, zero value otherwise.
|
|
func (o *RiskRiskModelState) GetWarm() bool {
|
|
if o == nil || IsNil(o.Warm) {
|
|
var ret bool
|
|
return ret
|
|
}
|
|
return *o.Warm
|
|
}
|
|
|
|
// GetWarmOk returns a tuple with the Warm field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *RiskRiskModelState) GetWarmOk() (*bool, bool) {
|
|
if o == nil || IsNil(o.Warm) {
|
|
return nil, false
|
|
}
|
|
return o.Warm, true
|
|
}
|
|
|
|
// HasWarm returns a boolean if a field has been set.
|
|
func (o *RiskRiskModelState) HasWarm() bool {
|
|
if o != nil && !IsNil(o.Warm) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetWarm gets a reference to the given bool and assigns it to the Warm field.
|
|
func (o *RiskRiskModelState) SetWarm(v bool) {
|
|
o.Warm = &v
|
|
}
|
|
|
|
func (o RiskRiskModelState) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o RiskRiskModelState) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Aggregates) {
|
|
toSerialize["aggregates"] = o.Aggregates
|
|
}
|
|
if !IsNil(o.Blind) {
|
|
toSerialize["blind"] = o.Blind
|
|
}
|
|
if !IsNil(o.Cut) {
|
|
toSerialize["cut"] = o.Cut
|
|
}
|
|
if !IsNil(o.Descends) {
|
|
toSerialize["descends"] = o.Descends
|
|
}
|
|
if !IsNil(o.Disposed) {
|
|
toSerialize["disposed"] = o.Disposed
|
|
}
|
|
if !IsNil(o.Learned) {
|
|
toSerialize["learned"] = o.Learned
|
|
}
|
|
if !IsNil(o.Live) {
|
|
toSerialize["live"] = o.Live
|
|
}
|
|
if !IsNil(o.Policy) {
|
|
toSerialize["policy"] = o.Policy
|
|
}
|
|
if !IsNil(o.Realised) {
|
|
toSerialize["realised"] = o.Realised
|
|
}
|
|
if !IsNil(o.Refused) {
|
|
toSerialize["refused"] = o.Refused
|
|
}
|
|
if !IsNil(o.Sample) {
|
|
toSerialize["sample"] = o.Sample
|
|
}
|
|
if !IsNil(o.Saturated) {
|
|
toSerialize["saturated"] = o.Saturated
|
|
}
|
|
if !IsNil(o.Shape) {
|
|
toSerialize["shape"] = o.Shape
|
|
}
|
|
if !IsNil(o.Stated) {
|
|
toSerialize["stated"] = o.Stated
|
|
}
|
|
if !IsNil(o.Surface) {
|
|
toSerialize["surface"] = o.Surface
|
|
}
|
|
if !IsNil(o.Tenant) {
|
|
toSerialize["tenant"] = o.Tenant
|
|
}
|
|
if !IsNil(o.Values) {
|
|
toSerialize["values"] = o.Values
|
|
}
|
|
if !IsNil(o.Warm) {
|
|
toSerialize["warm"] = o.Warm
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *RiskRiskModelState) UnmarshalJSON(data []byte) (err error) {
|
|
varRiskRiskModelState := _RiskRiskModelState{}
|
|
|
|
err = json.Unmarshal(data, &varRiskRiskModelState)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = RiskRiskModelState(varRiskRiskModelState)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "aggregates")
|
|
delete(additionalProperties, "blind")
|
|
delete(additionalProperties, "cut")
|
|
delete(additionalProperties, "descends")
|
|
delete(additionalProperties, "disposed")
|
|
delete(additionalProperties, "learned")
|
|
delete(additionalProperties, "live")
|
|
delete(additionalProperties, "policy")
|
|
delete(additionalProperties, "realised")
|
|
delete(additionalProperties, "refused")
|
|
delete(additionalProperties, "sample")
|
|
delete(additionalProperties, "saturated")
|
|
delete(additionalProperties, "shape")
|
|
delete(additionalProperties, "stated")
|
|
delete(additionalProperties, "surface")
|
|
delete(additionalProperties, "tenant")
|
|
delete(additionalProperties, "values")
|
|
delete(additionalProperties, "warm")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableRiskRiskModelState struct {
|
|
value *RiskRiskModelState
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableRiskRiskModelState) Get() *RiskRiskModelState {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableRiskRiskModelState) Set(val *RiskRiskModelState) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableRiskRiskModelState) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableRiskRiskModelState) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableRiskRiskModelState(val *RiskRiskModelState) *NullableRiskRiskModelState {
|
|
return &NullableRiskRiskModelState{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableRiskRiskModelState) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableRiskRiskModelState) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|