Files
sdk/model_label_risk_label_record.go

611 lines
19 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 LabelRiskLabelRecord type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &LabelRiskLabelRecord{}
// LabelRiskLabelRecord struct for LabelRiskLabelRecord
type LabelRiskLabelRecord struct {
// At is when the judged EVENT happened, RFC 3339 in UTC, truncated to the second. The filer supplies it, and it is what a maturity horizon measures from: this event's as-of is At plus the horizon. A resolve names it back exactly, to the second.
At *string `json:"at,omitempty"`
// By is the identity that asserted, stamped server-side at the write.
By *string `json:"by,omitempty"`
// Confidence is the filer's own confidence in [0,1] — 1 for a processor chargeback, less for an analyst's hunch. Zero is the ordinary value for a filer that stated none, and it means the weakest tie-break there is rather than \"unknown\". It breaks a tie only WITHIN one precedence rank and can never lift a weak source above a strong one.
Confidence *float64 `json:"confidence,omitempty"`
// Disposition is what was concluded, from the closed set: `productive` — the event led somewhere, escalated, reported or charged back; `unproductive` — judged not suspicious; or the empty string for an explicit UNJUDGED, which is a real assertion (\"we looked and could not say\") and not the absence of one.
Disposition *string `json:"disposition,omitempty"`
// Evidence is the pointer to the record this conclusion came from: a dispute id, a case id, a decision id. At most 512 bytes, required at the write, and opaque to this plane — stored and returned verbatim, never resolved. It is what an adverse action is defended with, which is why an assertion carrying none is refused at the endpoint.
Evidence *string `json:"evidence,omitempty"`
// Hold is true while a litigation hold is on this record: retention will not dispose of it, at any age. False — and it is omitted then — leaves the record disposable once it is older than the boundary a sweep names. It is a fact about the RECORD and not about the world, so it is not folded into ID, no write path can set it, and the hold op is the one way it moves in either direction.
Hold *bool `json:"hold,omitempty"`
// ID is the assertion's content digest — SHA-256 over every semantic field, rendered hex — computed server-side and never supplied. It is the key a redelivery collapses onto, and it is the id the hold op names.
Id *string `json:"id,omitempty"`
// Kind is what the subject IS, from the closed set: account, agent, merchant, payout, person, session or transaction. With Subject and At it is the IDENTITY of the judged event — the triple a resolve names and the triple assertions are grouped by, so a typo in it would file a label against an event nobody asks about.
Kind *string `json:"kind,omitempty"`
// Knowable is when THIS PLANE could first have answered with the assertion: the later of Seen and the server clock at the write, derived server-side. It is the instant the leakage guard compares, so it is published beside the claim it was derived from — an answer whose rule nobody can see is one nobody can check.
Knowable *string `json:"knowable,omitempty"`
// Seen is when the FILER said the assertion became knowable. It is provenance: it is recorded and published, and it decides nothing.
Seen *string `json:"seen,omitempty"`
// Source is WHO asserted, from the closed set: chargeoff, dispute, case, refund, review or sample. It is the primary term of the precedence rule — an unknown source has no rank and a conflict with it could not be resolved — so it is what decides which of two disagreeing assertions is in force.
Source *string `json:"source,omitempty"`
// Subject is the entity that was judged, named in the TENANT'S OWN namespace and at most 512 bytes. It is opaque here: stored, matched and returned verbatim, never dereferenced. It has no meaning outside this tenant — the record is the tenant's own file — so an id lifted from another tenant's response names nothing.
Subject *string `json:"subject,omitempty"`
// Wrote is the server clock at the write. It is the only time on the record the tenant did not supply, and it is what retention measures against.
Wrote *string `json:"wrote,omitempty"`
AdditionalProperties map[string]interface{}
}
type _LabelRiskLabelRecord LabelRiskLabelRecord
// NewLabelRiskLabelRecord instantiates a new LabelRiskLabelRecord 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 NewLabelRiskLabelRecord() *LabelRiskLabelRecord {
this := LabelRiskLabelRecord{}
return &this
}
// NewLabelRiskLabelRecordWithDefaults instantiates a new LabelRiskLabelRecord 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 NewLabelRiskLabelRecordWithDefaults() *LabelRiskLabelRecord {
this := LabelRiskLabelRecord{}
return &this
}
// GetAt returns the At field value if set, zero value otherwise.
func (o *LabelRiskLabelRecord) 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 *LabelRiskLabelRecord) 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 *LabelRiskLabelRecord) 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 *LabelRiskLabelRecord) SetAt(v string) {
o.At = &v
}
// GetBy returns the By field value if set, zero value otherwise.
func (o *LabelRiskLabelRecord) 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 *LabelRiskLabelRecord) 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 *LabelRiskLabelRecord) 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 *LabelRiskLabelRecord) SetBy(v string) {
o.By = &v
}
// GetConfidence returns the Confidence field value if set, zero value otherwise.
func (o *LabelRiskLabelRecord) 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 *LabelRiskLabelRecord) 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 *LabelRiskLabelRecord) 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 *LabelRiskLabelRecord) SetConfidence(v float64) {
o.Confidence = &v
}
// GetDisposition returns the Disposition field value if set, zero value otherwise.
func (o *LabelRiskLabelRecord) 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 *LabelRiskLabelRecord) 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 *LabelRiskLabelRecord) 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 *LabelRiskLabelRecord) SetDisposition(v string) {
o.Disposition = &v
}
// GetEvidence returns the Evidence field value if set, zero value otherwise.
func (o *LabelRiskLabelRecord) 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 *LabelRiskLabelRecord) 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 *LabelRiskLabelRecord) 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 *LabelRiskLabelRecord) SetEvidence(v string) {
o.Evidence = &v
}
// GetHold returns the Hold field value if set, zero value otherwise.
func (o *LabelRiskLabelRecord) GetHold() bool {
if o == nil || IsNil(o.Hold) {
var ret bool
return ret
}
return *o.Hold
}
// GetHoldOk returns a tuple with the Hold field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *LabelRiskLabelRecord) GetHoldOk() (*bool, bool) {
if o == nil || IsNil(o.Hold) {
return nil, false
}
return o.Hold, true
}
// HasHold returns a boolean if a field has been set.
func (o *LabelRiskLabelRecord) HasHold() bool {
if o != nil && !IsNil(o.Hold) {
return true
}
return false
}
// SetHold gets a reference to the given bool and assigns it to the Hold field.
func (o *LabelRiskLabelRecord) SetHold(v bool) {
o.Hold = &v
}
// GetId returns the Id field value if set, zero value otherwise.
func (o *LabelRiskLabelRecord) 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 *LabelRiskLabelRecord) 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 *LabelRiskLabelRecord) 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 *LabelRiskLabelRecord) SetId(v string) {
o.Id = &v
}
// GetKind returns the Kind field value if set, zero value otherwise.
func (o *LabelRiskLabelRecord) 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 *LabelRiskLabelRecord) 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 *LabelRiskLabelRecord) 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 *LabelRiskLabelRecord) SetKind(v string) {
o.Kind = &v
}
// GetKnowable returns the Knowable field value if set, zero value otherwise.
func (o *LabelRiskLabelRecord) GetKnowable() string {
if o == nil || IsNil(o.Knowable) {
var ret string
return ret
}
return *o.Knowable
}
// GetKnowableOk returns a tuple with the Knowable field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *LabelRiskLabelRecord) GetKnowableOk() (*string, bool) {
if o == nil || IsNil(o.Knowable) {
return nil, false
}
return o.Knowable, true
}
// HasKnowable returns a boolean if a field has been set.
func (o *LabelRiskLabelRecord) HasKnowable() bool {
if o != nil && !IsNil(o.Knowable) {
return true
}
return false
}
// SetKnowable gets a reference to the given string and assigns it to the Knowable field.
func (o *LabelRiskLabelRecord) SetKnowable(v string) {
o.Knowable = &v
}
// GetSeen returns the Seen field value if set, zero value otherwise.
func (o *LabelRiskLabelRecord) GetSeen() string {
if o == nil || IsNil(o.Seen) {
var ret string
return ret
}
return *o.Seen
}
// GetSeenOk returns a tuple with the Seen field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *LabelRiskLabelRecord) GetSeenOk() (*string, bool) {
if o == nil || IsNil(o.Seen) {
return nil, false
}
return o.Seen, true
}
// HasSeen returns a boolean if a field has been set.
func (o *LabelRiskLabelRecord) HasSeen() bool {
if o != nil && !IsNil(o.Seen) {
return true
}
return false
}
// SetSeen gets a reference to the given string and assigns it to the Seen field.
func (o *LabelRiskLabelRecord) SetSeen(v string) {
o.Seen = &v
}
// GetSource returns the Source field value if set, zero value otherwise.
func (o *LabelRiskLabelRecord) 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 *LabelRiskLabelRecord) 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 *LabelRiskLabelRecord) 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 *LabelRiskLabelRecord) SetSource(v string) {
o.Source = &v
}
// GetSubject returns the Subject field value if set, zero value otherwise.
func (o *LabelRiskLabelRecord) 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 *LabelRiskLabelRecord) 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 *LabelRiskLabelRecord) 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 *LabelRiskLabelRecord) SetSubject(v string) {
o.Subject = &v
}
// GetWrote returns the Wrote field value if set, zero value otherwise.
func (o *LabelRiskLabelRecord) GetWrote() string {
if o == nil || IsNil(o.Wrote) {
var ret string
return ret
}
return *o.Wrote
}
// GetWroteOk returns a tuple with the Wrote field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *LabelRiskLabelRecord) GetWroteOk() (*string, bool) {
if o == nil || IsNil(o.Wrote) {
return nil, false
}
return o.Wrote, true
}
// HasWrote returns a boolean if a field has been set.
func (o *LabelRiskLabelRecord) HasWrote() bool {
if o != nil && !IsNil(o.Wrote) {
return true
}
return false
}
// SetWrote gets a reference to the given string and assigns it to the Wrote field.
func (o *LabelRiskLabelRecord) SetWrote(v string) {
o.Wrote = &v
}
func (o LabelRiskLabelRecord) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o LabelRiskLabelRecord) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
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.Disposition) {
toSerialize["disposition"] = o.Disposition
}
if !IsNil(o.Evidence) {
toSerialize["evidence"] = o.Evidence
}
if !IsNil(o.Hold) {
toSerialize["hold"] = o.Hold
}
if !IsNil(o.Id) {
toSerialize["id"] = o.Id
}
if !IsNil(o.Kind) {
toSerialize["kind"] = o.Kind
}
if !IsNil(o.Knowable) {
toSerialize["knowable"] = o.Knowable
}
if !IsNil(o.Seen) {
toSerialize["seen"] = o.Seen
}
if !IsNil(o.Source) {
toSerialize["source"] = o.Source
}
if !IsNil(o.Subject) {
toSerialize["subject"] = o.Subject
}
if !IsNil(o.Wrote) {
toSerialize["wrote"] = o.Wrote
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *LabelRiskLabelRecord) UnmarshalJSON(data []byte) (err error) {
varLabelRiskLabelRecord := _LabelRiskLabelRecord{}
err = json.Unmarshal(data, &varLabelRiskLabelRecord)
if err != nil {
return err
}
*o = LabelRiskLabelRecord(varLabelRiskLabelRecord)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "at")
delete(additionalProperties, "by")
delete(additionalProperties, "confidence")
delete(additionalProperties, "disposition")
delete(additionalProperties, "evidence")
delete(additionalProperties, "hold")
delete(additionalProperties, "id")
delete(additionalProperties, "kind")
delete(additionalProperties, "knowable")
delete(additionalProperties, "seen")
delete(additionalProperties, "source")
delete(additionalProperties, "subject")
delete(additionalProperties, "wrote")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableLabelRiskLabelRecord struct {
value *LabelRiskLabelRecord
isSet bool
}
func (v NullableLabelRiskLabelRecord) Get() *LabelRiskLabelRecord {
return v.value
}
func (v *NullableLabelRiskLabelRecord) Set(val *LabelRiskLabelRecord) {
v.value = val
v.isSet = true
}
func (v NullableLabelRiskLabelRecord) IsSet() bool {
return v.isSet
}
func (v *NullableLabelRiskLabelRecord) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableLabelRiskLabelRecord(val *LabelRiskLabelRecord) *NullableLabelRiskLabelRecord {
return &NullableLabelRiskLabelRecord{value: val, isSet: true}
}
func (v NullableLabelRiskLabelRecord) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableLabelRiskLabelRecord) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}