Files
sdk/model_label_risk_resolved.go

573 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 LabelRiskResolved type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &LabelRiskResolved{}
// LabelRiskResolved struct for LabelRiskResolved
type LabelRiskResolved struct {
// AsOf is the instant this answer was true at: the event time plus the horizon. Nothing seen after it was visible to this resolution.
AsOf *string `json:"asOf,omitempty"`
// At is the event's instant, RFC 3339, echoed. It is what the horizon is measured from, so At plus the horizon is AsOf.
At *string `json:"at,omitempty"`
// By is the identity that filed the WINNING assertion, `<home org>/<user>`, stamped server-side from the validated principal at the write and never taken from a body — an attribution the caller chose is not attribution. It is the winner's alone; every losing assertion keeps its own and is returned whole in Conflicts.
By *string `json:"by,omitempty"`
// Confidence is the winning assertion's own confidence in [0,1], zero when its filer stated none. It is reported because it is a term of the rule that picked the winner, and it is the weakest term but one: it breaks a tie inside one rank and never lifts a weak source above a strong one.
Confidence *float64 `json:"confidence,omitempty"`
// Conflicts is every other visible assertion, strongest first, whole. They are kept and returned rather than dropped, so an adverse action can show that the plane knew of a contrary claim and say why it lost. They are horizon-filtered exactly like the winner: an assertion that was not knowable yet cannot even be named here, because naming it would leak its existence into a past decision.
Conflicts []LabelRiskLabelRecord `json:"conflicts,omitempty"`
// Contested is true when a visible assertion claimed a DIFFERENT disposition. Two sources agreeing is corroboration, not conflict.
Contested *bool `json:"contested,omitempty"`
// Disposition is the claim IN FORCE at AsOf: productive, unproductive, or the empty string for an explicit unjudged. It is the winning assertion's own claim, never a vote or an average — an average of two adjudications is a third claim nobody made. A matured event nobody judged is not answered here at all; it is counted in Unlabelled, because manufacturing a negative there is how a fraud model comes to describe the incumbent block list.
Disposition *string `json:"disposition,omitempty"`
// Evidence is the winning assertion's pointer to the record behind it — the dispute, case or decision id it was filed with, opaque and verbatim. It travels with the answer so an adverse action can name what judged the subject without a second read.
Evidence *string `json:"evidence,omitempty"`
// ID is the winning assertion's content digest, so this answer traces to the exact record it came from — and that record can be placed under litigation hold by naming this id.
Id *string `json:"id,omitempty"`
// Kind is the judged entity's type, echoed from the event that was named. With Subject and At it is how a caller joins this answer back onto the training row or the decision it asked about.
Kind *string `json:"kind,omitempty"`
// Source is who filed the winning assertion, and it is the PRIMARY term of the rule that picked it. Sources rank by adjudication weight — chargeoff, dispute, case, refund, review, sample, strongest first — and only inside one rank do the tie-breaks run, in order: the assertion that became KNOWABLE latest, then the higher confidence, then the lower id. The vocabulary op publishes that order from the same declaration the resolver reads, so a caller holding a contested answer can reproduce it.
Source *string `json:"source,omitempty"`
// Subject is the entity id, echoed from the event that was named — the tenant's own key, returned verbatim.
Subject *string `json:"subject,omitempty"`
AdditionalProperties map[string]interface{}
}
type _LabelRiskResolved LabelRiskResolved
// NewLabelRiskResolved instantiates a new LabelRiskResolved 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 NewLabelRiskResolved() *LabelRiskResolved {
this := LabelRiskResolved{}
return &this
}
// NewLabelRiskResolvedWithDefaults instantiates a new LabelRiskResolved 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 NewLabelRiskResolvedWithDefaults() *LabelRiskResolved {
this := LabelRiskResolved{}
return &this
}
// GetAsOf returns the AsOf field value if set, zero value otherwise.
func (o *LabelRiskResolved) GetAsOf() string {
if o == nil || IsNil(o.AsOf) {
var ret string
return ret
}
return *o.AsOf
}
// GetAsOfOk returns a tuple with the AsOf field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *LabelRiskResolved) GetAsOfOk() (*string, bool) {
if o == nil || IsNil(o.AsOf) {
return nil, false
}
return o.AsOf, true
}
// HasAsOf returns a boolean if a field has been set.
func (o *LabelRiskResolved) HasAsOf() bool {
if o != nil && !IsNil(o.AsOf) {
return true
}
return false
}
// SetAsOf gets a reference to the given string and assigns it to the AsOf field.
func (o *LabelRiskResolved) SetAsOf(v string) {
o.AsOf = &v
}
// GetAt returns the At field value if set, zero value otherwise.
func (o *LabelRiskResolved) 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 *LabelRiskResolved) 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 *LabelRiskResolved) 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 *LabelRiskResolved) SetAt(v string) {
o.At = &v
}
// GetBy returns the By field value if set, zero value otherwise.
func (o *LabelRiskResolved) 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 *LabelRiskResolved) 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 *LabelRiskResolved) 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 *LabelRiskResolved) SetBy(v string) {
o.By = &v
}
// GetConfidence returns the Confidence field value if set, zero value otherwise.
func (o *LabelRiskResolved) GetConfidence() float64 {
if o == nil || IsNil(o.Confidence) {
var ret float64
return ret
}
return *o.Confidence
}
// GetConfidenceOk returns a tuple with the Confidence field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *LabelRiskResolved) GetConfidenceOk() (*float64, bool) {
if o == nil || IsNil(o.Confidence) {
return nil, false
}
return o.Confidence, true
}
// HasConfidence returns a boolean if a field has been set.
func (o *LabelRiskResolved) HasConfidence() bool {
if o != nil && !IsNil(o.Confidence) {
return true
}
return false
}
// SetConfidence gets a reference to the given float64 and assigns it to the Confidence field.
func (o *LabelRiskResolved) SetConfidence(v float64) {
o.Confidence = &v
}
// GetConflicts returns the Conflicts field value if set, zero value otherwise.
func (o *LabelRiskResolved) GetConflicts() []LabelRiskLabelRecord {
if o == nil || IsNil(o.Conflicts) {
var ret []LabelRiskLabelRecord
return ret
}
return o.Conflicts
}
// GetConflictsOk returns a tuple with the Conflicts field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *LabelRiskResolved) GetConflictsOk() ([]LabelRiskLabelRecord, bool) {
if o == nil || IsNil(o.Conflicts) {
return nil, false
}
return o.Conflicts, true
}
// HasConflicts returns a boolean if a field has been set.
func (o *LabelRiskResolved) HasConflicts() bool {
if o != nil && !IsNil(o.Conflicts) {
return true
}
return false
}
// SetConflicts gets a reference to the given []LabelRiskLabelRecord and assigns it to the Conflicts field.
func (o *LabelRiskResolved) SetConflicts(v []LabelRiskLabelRecord) {
o.Conflicts = v
}
// GetContested returns the Contested field value if set, zero value otherwise.
func (o *LabelRiskResolved) GetContested() bool {
if o == nil || IsNil(o.Contested) {
var ret bool
return ret
}
return *o.Contested
}
// GetContestedOk returns a tuple with the Contested field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *LabelRiskResolved) GetContestedOk() (*bool, bool) {
if o == nil || IsNil(o.Contested) {
return nil, false
}
return o.Contested, true
}
// HasContested returns a boolean if a field has been set.
func (o *LabelRiskResolved) HasContested() bool {
if o != nil && !IsNil(o.Contested) {
return true
}
return false
}
// SetContested gets a reference to the given bool and assigns it to the Contested field.
func (o *LabelRiskResolved) SetContested(v bool) {
o.Contested = &v
}
// GetDisposition returns the Disposition field value if set, zero value otherwise.
func (o *LabelRiskResolved) GetDisposition() string {
if o == nil || IsNil(o.Disposition) {
var ret string
return ret
}
return *o.Disposition
}
// GetDispositionOk returns a tuple with the Disposition field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *LabelRiskResolved) GetDispositionOk() (*string, bool) {
if o == nil || IsNil(o.Disposition) {
return nil, false
}
return o.Disposition, true
}
// HasDisposition returns a boolean if a field has been set.
func (o *LabelRiskResolved) HasDisposition() bool {
if o != nil && !IsNil(o.Disposition) {
return true
}
return false
}
// SetDisposition gets a reference to the given string and assigns it to the Disposition field.
func (o *LabelRiskResolved) SetDisposition(v string) {
o.Disposition = &v
}
// GetEvidence returns the Evidence field value if set, zero value otherwise.
func (o *LabelRiskResolved) GetEvidence() string {
if o == nil || IsNil(o.Evidence) {
var ret string
return ret
}
return *o.Evidence
}
// GetEvidenceOk returns a tuple with the Evidence field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *LabelRiskResolved) GetEvidenceOk() (*string, bool) {
if o == nil || IsNil(o.Evidence) {
return nil, false
}
return o.Evidence, true
}
// HasEvidence returns a boolean if a field has been set.
func (o *LabelRiskResolved) HasEvidence() bool {
if o != nil && !IsNil(o.Evidence) {
return true
}
return false
}
// SetEvidence gets a reference to the given string and assigns it to the Evidence field.
func (o *LabelRiskResolved) SetEvidence(v string) {
o.Evidence = &v
}
// GetId returns the Id field value if set, zero value otherwise.
func (o *LabelRiskResolved) GetId() string {
if o == nil || IsNil(o.Id) {
var ret string
return ret
}
return *o.Id
}
// GetIdOk returns a tuple with the Id field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *LabelRiskResolved) GetIdOk() (*string, bool) {
if o == nil || IsNil(o.Id) {
return nil, false
}
return o.Id, true
}
// HasId returns a boolean if a field has been set.
func (o *LabelRiskResolved) HasId() bool {
if o != nil && !IsNil(o.Id) {
return true
}
return false
}
// SetId gets a reference to the given string and assigns it to the Id field.
func (o *LabelRiskResolved) SetId(v string) {
o.Id = &v
}
// GetKind returns the Kind field value if set, zero value otherwise.
func (o *LabelRiskResolved) GetKind() string {
if o == nil || IsNil(o.Kind) {
var ret string
return ret
}
return *o.Kind
}
// GetKindOk returns a tuple with the Kind field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *LabelRiskResolved) GetKindOk() (*string, bool) {
if o == nil || IsNil(o.Kind) {
return nil, false
}
return o.Kind, true
}
// HasKind returns a boolean if a field has been set.
func (o *LabelRiskResolved) HasKind() bool {
if o != nil && !IsNil(o.Kind) {
return true
}
return false
}
// SetKind gets a reference to the given string and assigns it to the Kind field.
func (o *LabelRiskResolved) SetKind(v string) {
o.Kind = &v
}
// GetSource returns the Source field value if set, zero value otherwise.
func (o *LabelRiskResolved) GetSource() string {
if o == nil || IsNil(o.Source) {
var ret string
return ret
}
return *o.Source
}
// GetSourceOk returns a tuple with the Source field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *LabelRiskResolved) GetSourceOk() (*string, bool) {
if o == nil || IsNil(o.Source) {
return nil, false
}
return o.Source, true
}
// HasSource returns a boolean if a field has been set.
func (o *LabelRiskResolved) HasSource() bool {
if o != nil && !IsNil(o.Source) {
return true
}
return false
}
// SetSource gets a reference to the given string and assigns it to the Source field.
func (o *LabelRiskResolved) SetSource(v string) {
o.Source = &v
}
// GetSubject returns the Subject field value if set, zero value otherwise.
func (o *LabelRiskResolved) GetSubject() string {
if o == nil || IsNil(o.Subject) {
var ret string
return ret
}
return *o.Subject
}
// GetSubjectOk returns a tuple with the Subject field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *LabelRiskResolved) GetSubjectOk() (*string, bool) {
if o == nil || IsNil(o.Subject) {
return nil, false
}
return o.Subject, true
}
// HasSubject returns a boolean if a field has been set.
func (o *LabelRiskResolved) HasSubject() bool {
if o != nil && !IsNil(o.Subject) {
return true
}
return false
}
// SetSubject gets a reference to the given string and assigns it to the Subject field.
func (o *LabelRiskResolved) SetSubject(v string) {
o.Subject = &v
}
func (o LabelRiskResolved) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o LabelRiskResolved) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.AsOf) {
toSerialize["asOf"] = o.AsOf
}
if !IsNil(o.At) {
toSerialize["at"] = o.At
}
if !IsNil(o.By) {
toSerialize["by"] = o.By
}
if !IsNil(o.Confidence) {
toSerialize["confidence"] = o.Confidence
}
if !IsNil(o.Conflicts) {
toSerialize["conflicts"] = o.Conflicts
}
if !IsNil(o.Contested) {
toSerialize["contested"] = o.Contested
}
if !IsNil(o.Disposition) {
toSerialize["disposition"] = o.Disposition
}
if !IsNil(o.Evidence) {
toSerialize["evidence"] = o.Evidence
}
if !IsNil(o.Id) {
toSerialize["id"] = o.Id
}
if !IsNil(o.Kind) {
toSerialize["kind"] = o.Kind
}
if !IsNil(o.Source) {
toSerialize["source"] = o.Source
}
if !IsNil(o.Subject) {
toSerialize["subject"] = o.Subject
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *LabelRiskResolved) UnmarshalJSON(data []byte) (err error) {
varLabelRiskResolved := _LabelRiskResolved{}
err = json.Unmarshal(data, &varLabelRiskResolved)
if err != nil {
return err
}
*o = LabelRiskResolved(varLabelRiskResolved)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "asOf")
delete(additionalProperties, "at")
delete(additionalProperties, "by")
delete(additionalProperties, "confidence")
delete(additionalProperties, "conflicts")
delete(additionalProperties, "contested")
delete(additionalProperties, "disposition")
delete(additionalProperties, "evidence")
delete(additionalProperties, "id")
delete(additionalProperties, "kind")
delete(additionalProperties, "source")
delete(additionalProperties, "subject")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableLabelRiskResolved struct {
value *LabelRiskResolved
isSet bool
}
func (v NullableLabelRiskResolved) Get() *LabelRiskResolved {
return v.value
}
func (v *NullableLabelRiskResolved) Set(val *LabelRiskResolved) {
v.value = val
v.isSet = true
}
func (v NullableLabelRiskResolved) IsSet() bool {
return v.isSet
}
func (v *NullableLabelRiskResolved) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableLabelRiskResolved(val *LabelRiskResolved) *NullableLabelRiskResolved {
return &NullableLabelRiskResolved{value: val, isSet: true}
}
func (v NullableLabelRiskResolved) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableLabelRiskResolved) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}