Files
sdk/model_risk_risk_model_feature.go

459 lines
12 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 RiskRiskModelFeature type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &RiskRiskModelFeature{}
// RiskRiskModelFeature struct for RiskRiskModelFeature
type RiskRiskModelFeature struct {
// Blind is how often this dimension took that neutral value for THIS organisation.
Blind *int64 `json:"blind,omitempty"`
// Citation is where those words come from, so the claim is checkable rather than asserted.
Citation *string `json:"citation,omitempty"`
// Indicator is the supervisor's own words for the thing being looked for.
Indicator *string `json:"indicator,omitempty"`
// Name is the dimension.
Name *string `json:"name,omitempty"`
// Neutral is the value the coordinate takes when the data cannot support it.
Neutral *float64 `json:"neutral,omitempty"`
// Severity is how much weight an alert on it carries.
Severity *string `json:"severity,omitempty"`
// Typology is the pattern this dimension detects.
Typology *string `json:"typology,omitempty"`
// Unit is how to read the raw number, which is what turns a coordinate into a sentence an investigator can put in a file.
Unit *string `json:"unit,omitempty"`
// Window is the sliding aggregate it reads.
Window *string `json:"window,omitempty"`
AdditionalProperties map[string]interface{}
}
type _RiskRiskModelFeature RiskRiskModelFeature
// NewRiskRiskModelFeature instantiates a new RiskRiskModelFeature 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 NewRiskRiskModelFeature() *RiskRiskModelFeature {
this := RiskRiskModelFeature{}
return &this
}
// NewRiskRiskModelFeatureWithDefaults instantiates a new RiskRiskModelFeature 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 NewRiskRiskModelFeatureWithDefaults() *RiskRiskModelFeature {
this := RiskRiskModelFeature{}
return &this
}
// GetBlind returns the Blind field value if set, zero value otherwise.
func (o *RiskRiskModelFeature) GetBlind() int64 {
if o == nil || IsNil(o.Blind) {
var ret int64
return ret
}
return *o.Blind
}
// GetBlindOk returns a tuple with the Blind field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *RiskRiskModelFeature) GetBlindOk() (*int64, bool) {
if o == nil || IsNil(o.Blind) {
return nil, false
}
return o.Blind, true
}
// HasBlind returns a boolean if a field has been set.
func (o *RiskRiskModelFeature) HasBlind() bool {
if o != nil && !IsNil(o.Blind) {
return true
}
return false
}
// SetBlind gets a reference to the given int64 and assigns it to the Blind field.
func (o *RiskRiskModelFeature) SetBlind(v int64) {
o.Blind = &v
}
// GetCitation returns the Citation field value if set, zero value otherwise.
func (o *RiskRiskModelFeature) 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 *RiskRiskModelFeature) 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 *RiskRiskModelFeature) 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 *RiskRiskModelFeature) SetCitation(v string) {
o.Citation = &v
}
// GetIndicator returns the Indicator field value if set, zero value otherwise.
func (o *RiskRiskModelFeature) 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 *RiskRiskModelFeature) 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 *RiskRiskModelFeature) 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 *RiskRiskModelFeature) SetIndicator(v string) {
o.Indicator = &v
}
// GetName returns the Name field value if set, zero value otherwise.
func (o *RiskRiskModelFeature) GetName() string {
if o == nil || IsNil(o.Name) {
var ret string
return ret
}
return *o.Name
}
// GetNameOk returns a tuple with the Name field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *RiskRiskModelFeature) GetNameOk() (*string, bool) {
if o == nil || IsNil(o.Name) {
return nil, false
}
return o.Name, true
}
// HasName returns a boolean if a field has been set.
func (o *RiskRiskModelFeature) HasName() bool {
if o != nil && !IsNil(o.Name) {
return true
}
return false
}
// SetName gets a reference to the given string and assigns it to the Name field.
func (o *RiskRiskModelFeature) SetName(v string) {
o.Name = &v
}
// GetNeutral returns the Neutral field value if set, zero value otherwise.
func (o *RiskRiskModelFeature) GetNeutral() float64 {
if o == nil || IsNil(o.Neutral) {
var ret float64
return ret
}
return *o.Neutral
}
// GetNeutralOk returns a tuple with the Neutral field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *RiskRiskModelFeature) GetNeutralOk() (*float64, bool) {
if o == nil || IsNil(o.Neutral) {
return nil, false
}
return o.Neutral, true
}
// HasNeutral returns a boolean if a field has been set.
func (o *RiskRiskModelFeature) HasNeutral() bool {
if o != nil && !IsNil(o.Neutral) {
return true
}
return false
}
// SetNeutral gets a reference to the given float64 and assigns it to the Neutral field.
func (o *RiskRiskModelFeature) SetNeutral(v float64) {
o.Neutral = &v
}
// GetSeverity returns the Severity field value if set, zero value otherwise.
func (o *RiskRiskModelFeature) 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 *RiskRiskModelFeature) 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 *RiskRiskModelFeature) 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 *RiskRiskModelFeature) SetSeverity(v string) {
o.Severity = &v
}
// GetTypology returns the Typology field value if set, zero value otherwise.
func (o *RiskRiskModelFeature) 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 *RiskRiskModelFeature) 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 *RiskRiskModelFeature) 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 *RiskRiskModelFeature) SetTypology(v string) {
o.Typology = &v
}
// GetUnit returns the Unit field value if set, zero value otherwise.
func (o *RiskRiskModelFeature) 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 *RiskRiskModelFeature) 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 *RiskRiskModelFeature) 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 *RiskRiskModelFeature) SetUnit(v string) {
o.Unit = &v
}
// GetWindow returns the Window field value if set, zero value otherwise.
func (o *RiskRiskModelFeature) 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 *RiskRiskModelFeature) 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 *RiskRiskModelFeature) 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 *RiskRiskModelFeature) SetWindow(v string) {
o.Window = &v
}
func (o RiskRiskModelFeature) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o RiskRiskModelFeature) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Blind) {
toSerialize["blind"] = o.Blind
}
if !IsNil(o.Citation) {
toSerialize["citation"] = o.Citation
}
if !IsNil(o.Indicator) {
toSerialize["indicator"] = o.Indicator
}
if !IsNil(o.Name) {
toSerialize["name"] = o.Name
}
if !IsNil(o.Neutral) {
toSerialize["neutral"] = o.Neutral
}
if !IsNil(o.Severity) {
toSerialize["severity"] = o.Severity
}
if !IsNil(o.Typology) {
toSerialize["typology"] = o.Typology
}
if !IsNil(o.Unit) {
toSerialize["unit"] = o.Unit
}
if !IsNil(o.Window) {
toSerialize["window"] = o.Window
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *RiskRiskModelFeature) UnmarshalJSON(data []byte) (err error) {
varRiskRiskModelFeature := _RiskRiskModelFeature{}
err = json.Unmarshal(data, &varRiskRiskModelFeature)
if err != nil {
return err
}
*o = RiskRiskModelFeature(varRiskRiskModelFeature)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "blind")
delete(additionalProperties, "citation")
delete(additionalProperties, "indicator")
delete(additionalProperties, "name")
delete(additionalProperties, "neutral")
delete(additionalProperties, "severity")
delete(additionalProperties, "typology")
delete(additionalProperties, "unit")
delete(additionalProperties, "window")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableRiskRiskModelFeature struct {
value *RiskRiskModelFeature
isSet bool
}
func (v NullableRiskRiskModelFeature) Get() *RiskRiskModelFeature {
return v.value
}
func (v *NullableRiskRiskModelFeature) Set(val *RiskRiskModelFeature) {
v.value = val
v.isSet = true
}
func (v NullableRiskRiskModelFeature) IsSet() bool {
return v.isSet
}
func (v *NullableRiskRiskModelFeature) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableRiskRiskModelFeature(val *RiskRiskModelFeature) *NullableRiskRiskModelFeature {
return &NullableRiskRiskModelFeature{value: val, isSet: true}
}
func (v NullableRiskRiskModelFeature) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableRiskRiskModelFeature) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}