Files
sdk/model_label_risk_source_coverage.go

231 lines
7.1 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 LabelRiskSourceCoverage type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &LabelRiskSourceCoverage{}
// LabelRiskSourceCoverage struct for LabelRiskSourceCoverage
type LabelRiskSourceCoverage struct {
// Facts is how many assertions this source filed; Won is how many judged events it was the assertion in force for. A source with many facts and few wins is one that is being outranked, which is worth knowing before concluding it is wired correctly.
Facts *int64 `json:"facts,omitempty"`
// Source is the asserter these two counts are for — chargeoff, dispute, case, refund, review or sample. There is one entry per source that either filed in the window or won in it, in precedence order, strongest first. A source no longer in the vocabulary still has rows and is reported after the known ones rather than dropped out of a total that is supposed to add up.
Source *string `json:"source,omitempty"`
// Won is how many JUDGED events this source's assertion was the one IN FORCE for, at that event's own as-of — it beat every other visible claim under the precedence rule. Summed over the sources it is Judged. Read against Facts it is the ratio that matters: many filed and few won is a source being outranked, not a source that is broken, and one source winning nearly everything is a plane that looks labelled because one noisy filer dominates it.
Won *int64 `json:"won,omitempty"`
AdditionalProperties map[string]interface{}
}
type _LabelRiskSourceCoverage LabelRiskSourceCoverage
// NewLabelRiskSourceCoverage instantiates a new LabelRiskSourceCoverage 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 NewLabelRiskSourceCoverage() *LabelRiskSourceCoverage {
this := LabelRiskSourceCoverage{}
return &this
}
// NewLabelRiskSourceCoverageWithDefaults instantiates a new LabelRiskSourceCoverage 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 NewLabelRiskSourceCoverageWithDefaults() *LabelRiskSourceCoverage {
this := LabelRiskSourceCoverage{}
return &this
}
// GetFacts returns the Facts field value if set, zero value otherwise.
func (o *LabelRiskSourceCoverage) GetFacts() int64 {
if o == nil || IsNil(o.Facts) {
var ret int64
return ret
}
return *o.Facts
}
// GetFactsOk returns a tuple with the Facts field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *LabelRiskSourceCoverage) GetFactsOk() (*int64, bool) {
if o == nil || IsNil(o.Facts) {
return nil, false
}
return o.Facts, true
}
// HasFacts returns a boolean if a field has been set.
func (o *LabelRiskSourceCoverage) HasFacts() bool {
if o != nil && !IsNil(o.Facts) {
return true
}
return false
}
// SetFacts gets a reference to the given int64 and assigns it to the Facts field.
func (o *LabelRiskSourceCoverage) SetFacts(v int64) {
o.Facts = &v
}
// GetSource returns the Source field value if set, zero value otherwise.
func (o *LabelRiskSourceCoverage) 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 *LabelRiskSourceCoverage) 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 *LabelRiskSourceCoverage) 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 *LabelRiskSourceCoverage) SetSource(v string) {
o.Source = &v
}
// GetWon returns the Won field value if set, zero value otherwise.
func (o *LabelRiskSourceCoverage) GetWon() int64 {
if o == nil || IsNil(o.Won) {
var ret int64
return ret
}
return *o.Won
}
// GetWonOk returns a tuple with the Won field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *LabelRiskSourceCoverage) GetWonOk() (*int64, bool) {
if o == nil || IsNil(o.Won) {
return nil, false
}
return o.Won, true
}
// HasWon returns a boolean if a field has been set.
func (o *LabelRiskSourceCoverage) HasWon() bool {
if o != nil && !IsNil(o.Won) {
return true
}
return false
}
// SetWon gets a reference to the given int64 and assigns it to the Won field.
func (o *LabelRiskSourceCoverage) SetWon(v int64) {
o.Won = &v
}
func (o LabelRiskSourceCoverage) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o LabelRiskSourceCoverage) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Facts) {
toSerialize["facts"] = o.Facts
}
if !IsNil(o.Source) {
toSerialize["source"] = o.Source
}
if !IsNil(o.Won) {
toSerialize["won"] = o.Won
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *LabelRiskSourceCoverage) UnmarshalJSON(data []byte) (err error) {
varLabelRiskSourceCoverage := _LabelRiskSourceCoverage{}
err = json.Unmarshal(data, &varLabelRiskSourceCoverage)
if err != nil {
return err
}
*o = LabelRiskSourceCoverage(varLabelRiskSourceCoverage)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "facts")
delete(additionalProperties, "source")
delete(additionalProperties, "won")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableLabelRiskSourceCoverage struct {
value *LabelRiskSourceCoverage
isSet bool
}
func (v NullableLabelRiskSourceCoverage) Get() *LabelRiskSourceCoverage {
return v.value
}
func (v *NullableLabelRiskSourceCoverage) Set(val *LabelRiskSourceCoverage) {
v.value = val
v.isSet = true
}
func (v NullableLabelRiskSourceCoverage) IsSet() bool {
return v.isSet
}
func (v *NullableLabelRiskSourceCoverage) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableLabelRiskSourceCoverage(val *LabelRiskSourceCoverage) *NullableLabelRiskSourceCoverage {
return &NullableLabelRiskSourceCoverage{value: val, isSet: true}
}
func (v NullableLabelRiskSourceCoverage) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableLabelRiskSourceCoverage) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}