Files
sdk/model_risk_risk_cause.go

497 lines
13 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 RiskRiskCause type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &RiskRiskCause{}
// RiskRiskCause struct for RiskRiskCause
type RiskRiskCause struct {
// Baseline is the number it was measured against — always this organisation's own history, never a fixed limit and never another organisation's.
Baseline *float64 `json:"baseline,omitempty"`
// Citation is where those words come from, so the claim is checkable rather than asserted — which is what a chargeback network or a regulator asks for.
Citation *string `json:"citation,omitempty"`
// Feature is the dimension that contributed.
Feature *string `json:"feature,omitempty"`
// Indicator is the supervisor's own words for the thing being looked for.
Indicator *string `json:"indicator,omitempty"`
// Observed is the raw number the coordinate was computed from.
Observed *float64 `json:"observed,omitempty"`
// Severity is how much weight this dimension carries.
Severity *string `json:"severity,omitempty"`
// Share is this feature's part of the score, in [0,1]. Zero across every cause means no single feature accounts for the alert and the combination does; the causes are then ordered by how far each sits from unremarkable.
Share *float64 `json:"share,omitempty"`
// Typology is the laundering or abuse pattern this dimension detects.
Typology *string `json:"typology,omitempty"`
// Unit is how to read Observed, which is what turns a coordinate into a sentence.
Unit *string `json:"unit,omitempty"`
// Without is the score the same event would have received with this coordinate at its neutral value — the counterfactual itself.
Without *float64 `json:"without,omitempty"`
AdditionalProperties map[string]interface{}
}
type _RiskRiskCause RiskRiskCause
// NewRiskRiskCause instantiates a new RiskRiskCause 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 NewRiskRiskCause() *RiskRiskCause {
this := RiskRiskCause{}
return &this
}
// NewRiskRiskCauseWithDefaults instantiates a new RiskRiskCause 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 NewRiskRiskCauseWithDefaults() *RiskRiskCause {
this := RiskRiskCause{}
return &this
}
// GetBaseline returns the Baseline field value if set, zero value otherwise.
func (o *RiskRiskCause) GetBaseline() float64 {
if o == nil || IsNil(o.Baseline) {
var ret float64
return ret
}
return *o.Baseline
}
// GetBaselineOk returns a tuple with the Baseline field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *RiskRiskCause) GetBaselineOk() (*float64, bool) {
if o == nil || IsNil(o.Baseline) {
return nil, false
}
return o.Baseline, true
}
// HasBaseline returns a boolean if a field has been set.
func (o *RiskRiskCause) HasBaseline() bool {
if o != nil && !IsNil(o.Baseline) {
return true
}
return false
}
// SetBaseline gets a reference to the given float64 and assigns it to the Baseline field.
func (o *RiskRiskCause) SetBaseline(v float64) {
o.Baseline = &v
}
// GetCitation returns the Citation field value if set, zero value otherwise.
func (o *RiskRiskCause) GetCitation() string {
if o == nil || IsNil(o.Citation) {
var ret string
return ret
}
return *o.Citation
}
// GetCitationOk returns a tuple with the Citation field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *RiskRiskCause) GetCitationOk() (*string, bool) {
if o == nil || IsNil(o.Citation) {
return nil, false
}
return o.Citation, true
}
// HasCitation returns a boolean if a field has been set.
func (o *RiskRiskCause) HasCitation() bool {
if o != nil && !IsNil(o.Citation) {
return true
}
return false
}
// SetCitation gets a reference to the given string and assigns it to the Citation field.
func (o *RiskRiskCause) SetCitation(v string) {
o.Citation = &v
}
// GetFeature returns the Feature field value if set, zero value otherwise.
func (o *RiskRiskCause) GetFeature() string {
if o == nil || IsNil(o.Feature) {
var ret string
return ret
}
return *o.Feature
}
// GetFeatureOk returns a tuple with the Feature field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *RiskRiskCause) GetFeatureOk() (*string, bool) {
if o == nil || IsNil(o.Feature) {
return nil, false
}
return o.Feature, true
}
// HasFeature returns a boolean if a field has been set.
func (o *RiskRiskCause) HasFeature() bool {
if o != nil && !IsNil(o.Feature) {
return true
}
return false
}
// SetFeature gets a reference to the given string and assigns it to the Feature field.
func (o *RiskRiskCause) SetFeature(v string) {
o.Feature = &v
}
// GetIndicator returns the Indicator field value if set, zero value otherwise.
func (o *RiskRiskCause) GetIndicator() string {
if o == nil || IsNil(o.Indicator) {
var ret string
return ret
}
return *o.Indicator
}
// GetIndicatorOk returns a tuple with the Indicator field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *RiskRiskCause) GetIndicatorOk() (*string, bool) {
if o == nil || IsNil(o.Indicator) {
return nil, false
}
return o.Indicator, true
}
// HasIndicator returns a boolean if a field has been set.
func (o *RiskRiskCause) HasIndicator() bool {
if o != nil && !IsNil(o.Indicator) {
return true
}
return false
}
// SetIndicator gets a reference to the given string and assigns it to the Indicator field.
func (o *RiskRiskCause) SetIndicator(v string) {
o.Indicator = &v
}
// GetObserved returns the Observed field value if set, zero value otherwise.
func (o *RiskRiskCause) GetObserved() float64 {
if o == nil || IsNil(o.Observed) {
var ret float64
return ret
}
return *o.Observed
}
// GetObservedOk returns a tuple with the Observed field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *RiskRiskCause) GetObservedOk() (*float64, bool) {
if o == nil || IsNil(o.Observed) {
return nil, false
}
return o.Observed, true
}
// HasObserved returns a boolean if a field has been set.
func (o *RiskRiskCause) HasObserved() bool {
if o != nil && !IsNil(o.Observed) {
return true
}
return false
}
// SetObserved gets a reference to the given float64 and assigns it to the Observed field.
func (o *RiskRiskCause) SetObserved(v float64) {
o.Observed = &v
}
// GetSeverity returns the Severity field value if set, zero value otherwise.
func (o *RiskRiskCause) GetSeverity() string {
if o == nil || IsNil(o.Severity) {
var ret string
return ret
}
return *o.Severity
}
// GetSeverityOk returns a tuple with the Severity field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *RiskRiskCause) GetSeverityOk() (*string, bool) {
if o == nil || IsNil(o.Severity) {
return nil, false
}
return o.Severity, true
}
// HasSeverity returns a boolean if a field has been set.
func (o *RiskRiskCause) HasSeverity() bool {
if o != nil && !IsNil(o.Severity) {
return true
}
return false
}
// SetSeverity gets a reference to the given string and assigns it to the Severity field.
func (o *RiskRiskCause) SetSeverity(v string) {
o.Severity = &v
}
// GetShare returns the Share field value if set, zero value otherwise.
func (o *RiskRiskCause) GetShare() float64 {
if o == nil || IsNil(o.Share) {
var ret float64
return ret
}
return *o.Share
}
// GetShareOk returns a tuple with the Share field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *RiskRiskCause) GetShareOk() (*float64, bool) {
if o == nil || IsNil(o.Share) {
return nil, false
}
return o.Share, true
}
// HasShare returns a boolean if a field has been set.
func (o *RiskRiskCause) HasShare() bool {
if o != nil && !IsNil(o.Share) {
return true
}
return false
}
// SetShare gets a reference to the given float64 and assigns it to the Share field.
func (o *RiskRiskCause) SetShare(v float64) {
o.Share = &v
}
// GetTypology returns the Typology field value if set, zero value otherwise.
func (o *RiskRiskCause) GetTypology() string {
if o == nil || IsNil(o.Typology) {
var ret string
return ret
}
return *o.Typology
}
// GetTypologyOk returns a tuple with the Typology field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *RiskRiskCause) GetTypologyOk() (*string, bool) {
if o == nil || IsNil(o.Typology) {
return nil, false
}
return o.Typology, true
}
// HasTypology returns a boolean if a field has been set.
func (o *RiskRiskCause) HasTypology() bool {
if o != nil && !IsNil(o.Typology) {
return true
}
return false
}
// SetTypology gets a reference to the given string and assigns it to the Typology field.
func (o *RiskRiskCause) SetTypology(v string) {
o.Typology = &v
}
// GetUnit returns the Unit field value if set, zero value otherwise.
func (o *RiskRiskCause) GetUnit() string {
if o == nil || IsNil(o.Unit) {
var ret string
return ret
}
return *o.Unit
}
// GetUnitOk returns a tuple with the Unit field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *RiskRiskCause) GetUnitOk() (*string, bool) {
if o == nil || IsNil(o.Unit) {
return nil, false
}
return o.Unit, true
}
// HasUnit returns a boolean if a field has been set.
func (o *RiskRiskCause) HasUnit() bool {
if o != nil && !IsNil(o.Unit) {
return true
}
return false
}
// SetUnit gets a reference to the given string and assigns it to the Unit field.
func (o *RiskRiskCause) SetUnit(v string) {
o.Unit = &v
}
// GetWithout returns the Without field value if set, zero value otherwise.
func (o *RiskRiskCause) GetWithout() float64 {
if o == nil || IsNil(o.Without) {
var ret float64
return ret
}
return *o.Without
}
// GetWithoutOk returns a tuple with the Without field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *RiskRiskCause) GetWithoutOk() (*float64, bool) {
if o == nil || IsNil(o.Without) {
return nil, false
}
return o.Without, true
}
// HasWithout returns a boolean if a field has been set.
func (o *RiskRiskCause) HasWithout() bool {
if o != nil && !IsNil(o.Without) {
return true
}
return false
}
// SetWithout gets a reference to the given float64 and assigns it to the Without field.
func (o *RiskRiskCause) SetWithout(v float64) {
o.Without = &v
}
func (o RiskRiskCause) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o RiskRiskCause) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Baseline) {
toSerialize["baseline"] = o.Baseline
}
if !IsNil(o.Citation) {
toSerialize["citation"] = o.Citation
}
if !IsNil(o.Feature) {
toSerialize["feature"] = o.Feature
}
if !IsNil(o.Indicator) {
toSerialize["indicator"] = o.Indicator
}
if !IsNil(o.Observed) {
toSerialize["observed"] = o.Observed
}
if !IsNil(o.Severity) {
toSerialize["severity"] = o.Severity
}
if !IsNil(o.Share) {
toSerialize["share"] = o.Share
}
if !IsNil(o.Typology) {
toSerialize["typology"] = o.Typology
}
if !IsNil(o.Unit) {
toSerialize["unit"] = o.Unit
}
if !IsNil(o.Without) {
toSerialize["without"] = o.Without
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *RiskRiskCause) UnmarshalJSON(data []byte) (err error) {
varRiskRiskCause := _RiskRiskCause{}
err = json.Unmarshal(data, &varRiskRiskCause)
if err != nil {
return err
}
*o = RiskRiskCause(varRiskRiskCause)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "baseline")
delete(additionalProperties, "citation")
delete(additionalProperties, "feature")
delete(additionalProperties, "indicator")
delete(additionalProperties, "observed")
delete(additionalProperties, "severity")
delete(additionalProperties, "share")
delete(additionalProperties, "typology")
delete(additionalProperties, "unit")
delete(additionalProperties, "without")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableRiskRiskCause struct {
value *RiskRiskCause
isSet bool
}
func (v NullableRiskRiskCause) Get() *RiskRiskCause {
return v.value
}
func (v *NullableRiskRiskCause) Set(val *RiskRiskCause) {
v.value = val
v.isSet = true
}
func (v NullableRiskRiskCause) IsSet() bool {
return v.isSet
}
func (v *NullableRiskRiskCause) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableRiskRiskCause(val *RiskRiskCause) *NullableRiskRiskCause {
return &NullableRiskRiskCause{value: val, isSet: true}
}
func (v NullableRiskRiskCause) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableRiskRiskCause) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}