Files
sdk/model_risk_risk_surface.go

345 lines
9.6 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 RiskRiskSurface type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &RiskRiskSurface{}
// RiskRiskSurface struct for RiskRiskSurface
type RiskRiskSurface struct {
// Folded is how many buckets of the tenant's own feature surface were folded into the model when it became resident.
Folded *int64 `json:"folded,omitempty"`
// Gap says why the fold did not happen or did not complete, when that is the case. An empty surface and an unreachable warehouse are different facts and a model must not report them as the same one.
Gap *string `json:"gap,omitempty"`
// Refused is how many buckets of this organisation's own surface the fold could not fold, because a subject on them is longer than this plane's own field bound. It is history the model does not have, said out loud.
Refused *int64 `json:"refused,omitempty"`
// Replayed is how many of this organisation's own recorded observations rebuilt its sliding aggregates when the model became resident. It is what says a rollout was a rebuild rather than a blindness: the aggregates are a projection of a durable record, so a restart costs a replay and not a control.
Replayed *int64 `json:"replayed,omitempty"`
// Rolled is how many windows of this organisation's own source planes — product events, captured failures, metered inference — were rolled up into its feature surface before that fold. Zero with no gap means the surface was already current, which is a different fact from the rollup never running.
Rolled *int64 `json:"rolled,omitempty"`
// Window is the lookback the fold covered.
Window *string `json:"window,omitempty"`
AdditionalProperties map[string]interface{}
}
type _RiskRiskSurface RiskRiskSurface
// NewRiskRiskSurface instantiates a new RiskRiskSurface 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 NewRiskRiskSurface() *RiskRiskSurface {
this := RiskRiskSurface{}
return &this
}
// NewRiskRiskSurfaceWithDefaults instantiates a new RiskRiskSurface 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 NewRiskRiskSurfaceWithDefaults() *RiskRiskSurface {
this := RiskRiskSurface{}
return &this
}
// GetFolded returns the Folded field value if set, zero value otherwise.
func (o *RiskRiskSurface) GetFolded() int64 {
if o == nil || IsNil(o.Folded) {
var ret int64
return ret
}
return *o.Folded
}
// GetFoldedOk returns a tuple with the Folded field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *RiskRiskSurface) GetFoldedOk() (*int64, bool) {
if o == nil || IsNil(o.Folded) {
return nil, false
}
return o.Folded, true
}
// HasFolded returns a boolean if a field has been set.
func (o *RiskRiskSurface) HasFolded() bool {
if o != nil && !IsNil(o.Folded) {
return true
}
return false
}
// SetFolded gets a reference to the given int64 and assigns it to the Folded field.
func (o *RiskRiskSurface) SetFolded(v int64) {
o.Folded = &v
}
// GetGap returns the Gap field value if set, zero value otherwise.
func (o *RiskRiskSurface) GetGap() string {
if o == nil || IsNil(o.Gap) {
var ret string
return ret
}
return *o.Gap
}
// GetGapOk returns a tuple with the Gap field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *RiskRiskSurface) GetGapOk() (*string, bool) {
if o == nil || IsNil(o.Gap) {
return nil, false
}
return o.Gap, true
}
// HasGap returns a boolean if a field has been set.
func (o *RiskRiskSurface) HasGap() bool {
if o != nil && !IsNil(o.Gap) {
return true
}
return false
}
// SetGap gets a reference to the given string and assigns it to the Gap field.
func (o *RiskRiskSurface) SetGap(v string) {
o.Gap = &v
}
// GetRefused returns the Refused field value if set, zero value otherwise.
func (o *RiskRiskSurface) GetRefused() int64 {
if o == nil || IsNil(o.Refused) {
var ret 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 *RiskRiskSurface) GetRefusedOk() (*int64, bool) {
if o == nil || IsNil(o.Refused) {
return nil, false
}
return o.Refused, true
}
// HasRefused returns a boolean if a field has been set.
func (o *RiskRiskSurface) HasRefused() bool {
if o != nil && !IsNil(o.Refused) {
return true
}
return false
}
// SetRefused gets a reference to the given int64 and assigns it to the Refused field.
func (o *RiskRiskSurface) SetRefused(v int64) {
o.Refused = &v
}
// GetReplayed returns the Replayed field value if set, zero value otherwise.
func (o *RiskRiskSurface) GetReplayed() int64 {
if o == nil || IsNil(o.Replayed) {
var ret int64
return ret
}
return *o.Replayed
}
// GetReplayedOk returns a tuple with the Replayed field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *RiskRiskSurface) GetReplayedOk() (*int64, bool) {
if o == nil || IsNil(o.Replayed) {
return nil, false
}
return o.Replayed, true
}
// HasReplayed returns a boolean if a field has been set.
func (o *RiskRiskSurface) HasReplayed() bool {
if o != nil && !IsNil(o.Replayed) {
return true
}
return false
}
// SetReplayed gets a reference to the given int64 and assigns it to the Replayed field.
func (o *RiskRiskSurface) SetReplayed(v int64) {
o.Replayed = &v
}
// GetRolled returns the Rolled field value if set, zero value otherwise.
func (o *RiskRiskSurface) GetRolled() int64 {
if o == nil || IsNil(o.Rolled) {
var ret int64
return ret
}
return *o.Rolled
}
// GetRolledOk returns a tuple with the Rolled field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *RiskRiskSurface) GetRolledOk() (*int64, bool) {
if o == nil || IsNil(o.Rolled) {
return nil, false
}
return o.Rolled, true
}
// HasRolled returns a boolean if a field has been set.
func (o *RiskRiskSurface) HasRolled() bool {
if o != nil && !IsNil(o.Rolled) {
return true
}
return false
}
// SetRolled gets a reference to the given int64 and assigns it to the Rolled field.
func (o *RiskRiskSurface) SetRolled(v int64) {
o.Rolled = &v
}
// GetWindow returns the Window field value if set, zero value otherwise.
func (o *RiskRiskSurface) GetWindow() string {
if o == nil || IsNil(o.Window) {
var ret string
return ret
}
return *o.Window
}
// GetWindowOk returns a tuple with the Window field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *RiskRiskSurface) GetWindowOk() (*string, bool) {
if o == nil || IsNil(o.Window) {
return nil, false
}
return o.Window, true
}
// HasWindow returns a boolean if a field has been set.
func (o *RiskRiskSurface) HasWindow() bool {
if o != nil && !IsNil(o.Window) {
return true
}
return false
}
// SetWindow gets a reference to the given string and assigns it to the Window field.
func (o *RiskRiskSurface) SetWindow(v string) {
o.Window = &v
}
func (o RiskRiskSurface) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o RiskRiskSurface) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Folded) {
toSerialize["folded"] = o.Folded
}
if !IsNil(o.Gap) {
toSerialize["gap"] = o.Gap
}
if !IsNil(o.Refused) {
toSerialize["refused"] = o.Refused
}
if !IsNil(o.Replayed) {
toSerialize["replayed"] = o.Replayed
}
if !IsNil(o.Rolled) {
toSerialize["rolled"] = o.Rolled
}
if !IsNil(o.Window) {
toSerialize["window"] = o.Window
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *RiskRiskSurface) UnmarshalJSON(data []byte) (err error) {
varRiskRiskSurface := _RiskRiskSurface{}
err = json.Unmarshal(data, &varRiskRiskSurface)
if err != nil {
return err
}
*o = RiskRiskSurface(varRiskRiskSurface)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "folded")
delete(additionalProperties, "gap")
delete(additionalProperties, "refused")
delete(additionalProperties, "replayed")
delete(additionalProperties, "rolled")
delete(additionalProperties, "window")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableRiskRiskSurface struct {
value *RiskRiskSurface
isSet bool
}
func (v NullableRiskRiskSurface) Get() *RiskRiskSurface {
return v.value
}
func (v *NullableRiskRiskSurface) Set(val *RiskRiskSurface) {
v.value = val
v.isSet = true
}
func (v NullableRiskRiskSurface) IsSet() bool {
return v.isSet
}
func (v *NullableRiskRiskSurface) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableRiskRiskSurface(val *RiskRiskSurface) *NullableRiskRiskSurface {
return &NullableRiskRiskSurface{value: val, isSet: true}
}
func (v NullableRiskRiskSurface) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableRiskRiskSurface) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}