/
model_risk_status_with_thresholds.go
196 lines (162 loc) · 5.76 KB
/
model_risk_status_with_thresholds.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
/*
Digital.ai Release API
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
API version: v1
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package openapi
import (
"encoding/json"
)
// checks if the RiskStatusWithThresholds type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &RiskStatusWithThresholds{}
// RiskStatusWithThresholds struct for RiskStatusWithThresholds
type RiskStatusWithThresholds struct {
RiskStatus *RiskStatus `json:"riskStatus,omitempty"`
AttentionNeededFrom *int32 `json:"attentionNeededFrom,omitempty"`
AtRiskFrom *int32 `json:"atRiskFrom,omitempty"`
}
// NewRiskStatusWithThresholds instantiates a new RiskStatusWithThresholds 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 NewRiskStatusWithThresholds() *RiskStatusWithThresholds {
this := RiskStatusWithThresholds{}
return &this
}
// NewRiskStatusWithThresholdsWithDefaults instantiates a new RiskStatusWithThresholds 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 NewRiskStatusWithThresholdsWithDefaults() *RiskStatusWithThresholds {
this := RiskStatusWithThresholds{}
return &this
}
// GetRiskStatus returns the RiskStatus field value if set, zero value otherwise.
func (o *RiskStatusWithThresholds) GetRiskStatus() RiskStatus {
if o == nil || IsNil(o.RiskStatus) {
var ret RiskStatus
return ret
}
return *o.RiskStatus
}
// GetRiskStatusOk returns a tuple with the RiskStatus field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *RiskStatusWithThresholds) GetRiskStatusOk() (*RiskStatus, bool) {
if o == nil || IsNil(o.RiskStatus) {
return nil, false
}
return o.RiskStatus, true
}
// HasRiskStatus returns a boolean if a field has been set.
func (o *RiskStatusWithThresholds) HasRiskStatus() bool {
if o != nil && !IsNil(o.RiskStatus) {
return true
}
return false
}
// SetRiskStatus gets a reference to the given RiskStatus and assigns it to the RiskStatus field.
func (o *RiskStatusWithThresholds) SetRiskStatus(v RiskStatus) {
o.RiskStatus = &v
}
// GetAttentionNeededFrom returns the AttentionNeededFrom field value if set, zero value otherwise.
func (o *RiskStatusWithThresholds) GetAttentionNeededFrom() int32 {
if o == nil || IsNil(o.AttentionNeededFrom) {
var ret int32
return ret
}
return *o.AttentionNeededFrom
}
// GetAttentionNeededFromOk returns a tuple with the AttentionNeededFrom field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *RiskStatusWithThresholds) GetAttentionNeededFromOk() (*int32, bool) {
if o == nil || IsNil(o.AttentionNeededFrom) {
return nil, false
}
return o.AttentionNeededFrom, true
}
// HasAttentionNeededFrom returns a boolean if a field has been set.
func (o *RiskStatusWithThresholds) HasAttentionNeededFrom() bool {
if o != nil && !IsNil(o.AttentionNeededFrom) {
return true
}
return false
}
// SetAttentionNeededFrom gets a reference to the given int32 and assigns it to the AttentionNeededFrom field.
func (o *RiskStatusWithThresholds) SetAttentionNeededFrom(v int32) {
o.AttentionNeededFrom = &v
}
// GetAtRiskFrom returns the AtRiskFrom field value if set, zero value otherwise.
func (o *RiskStatusWithThresholds) GetAtRiskFrom() int32 {
if o == nil || IsNil(o.AtRiskFrom) {
var ret int32
return ret
}
return *o.AtRiskFrom
}
// GetAtRiskFromOk returns a tuple with the AtRiskFrom field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *RiskStatusWithThresholds) GetAtRiskFromOk() (*int32, bool) {
if o == nil || IsNil(o.AtRiskFrom) {
return nil, false
}
return o.AtRiskFrom, true
}
// HasAtRiskFrom returns a boolean if a field has been set.
func (o *RiskStatusWithThresholds) HasAtRiskFrom() bool {
if o != nil && !IsNil(o.AtRiskFrom) {
return true
}
return false
}
// SetAtRiskFrom gets a reference to the given int32 and assigns it to the AtRiskFrom field.
func (o *RiskStatusWithThresholds) SetAtRiskFrom(v int32) {
o.AtRiskFrom = &v
}
func (o RiskStatusWithThresholds) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o RiskStatusWithThresholds) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.RiskStatus) {
toSerialize["riskStatus"] = o.RiskStatus
}
if !IsNil(o.AttentionNeededFrom) {
toSerialize["attentionNeededFrom"] = o.AttentionNeededFrom
}
if !IsNil(o.AtRiskFrom) {
toSerialize["atRiskFrom"] = o.AtRiskFrom
}
return toSerialize, nil
}
type NullableRiskStatusWithThresholds struct {
value *RiskStatusWithThresholds
isSet bool
}
func (v NullableRiskStatusWithThresholds) Get() *RiskStatusWithThresholds {
return v.value
}
func (v *NullableRiskStatusWithThresholds) Set(val *RiskStatusWithThresholds) {
v.value = val
v.isSet = true
}
func (v NullableRiskStatusWithThresholds) IsSet() bool {
return v.isSet
}
func (v *NullableRiskStatusWithThresholds) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableRiskStatusWithThresholds(val *RiskStatusWithThresholds) *NullableRiskStatusWithThresholds {
return &NullableRiskStatusWithThresholds{value: val, isSet: true}
}
func (v NullableRiskStatusWithThresholds) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableRiskStatusWithThresholds) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}