-
Notifications
You must be signed in to change notification settings - Fork 29
Expand file tree
/
Copy pathmodel_alert_record.go
More file actions
217 lines (174 loc) · 6 KB
/
model_alert_record.go
File metadata and controls
217 lines (174 loc) · 6 KB
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
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
/*
STACKIT Observability API
API endpoints for Observability on STACKIT
API version: 1.1.1
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package observability
import (
"encoding/json"
)
// checks if the AlertRecord type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &AlertRecord{}
/*
types and functions for expr
*/
// isNotNullableString
type AlertRecordGetExprAttributeType = *string
func getAlertRecordGetExprAttributeTypeOk(arg AlertRecordGetExprAttributeType) (ret AlertRecordGetExprRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setAlertRecordGetExprAttributeType(arg *AlertRecordGetExprAttributeType, val AlertRecordGetExprRetType) {
*arg = &val
}
type AlertRecordGetExprArgType = string
type AlertRecordGetExprRetType = string
/*
types and functions for labels
*/
// isContainer
type AlertRecordGetLabelsAttributeType = *map[string]string
type AlertRecordGetLabelsArgType = map[string]string
type AlertRecordGetLabelsRetType = map[string]string
func getAlertRecordGetLabelsAttributeTypeOk(arg AlertRecordGetLabelsAttributeType) (ret AlertRecordGetLabelsRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setAlertRecordGetLabelsAttributeType(arg *AlertRecordGetLabelsAttributeType, val AlertRecordGetLabelsRetType) {
*arg = &val
}
/*
types and functions for record
*/
// isNotNullableString
type AlertRecordGetRecordAttributeType = *string
func getAlertRecordGetRecordAttributeTypeOk(arg AlertRecordGetRecordAttributeType) (ret AlertRecordGetRecordRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setAlertRecordGetRecordAttributeType(arg *AlertRecordGetRecordAttributeType, val AlertRecordGetRecordRetType) {
*arg = &val
}
type AlertRecordGetRecordArgType = string
type AlertRecordGetRecordRetType = string
// AlertRecord struct for AlertRecord
type AlertRecord struct {
// REQUIRED
Expr AlertRecordGetExprAttributeType `json:"expr" required:"true"`
Labels AlertRecordGetLabelsAttributeType `json:"labels,omitempty"`
// REQUIRED
Record AlertRecordGetRecordAttributeType `json:"record" required:"true"`
}
type _AlertRecord AlertRecord
// NewAlertRecord instantiates a new AlertRecord 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 NewAlertRecord(expr AlertRecordGetExprArgType, record AlertRecordGetRecordArgType) *AlertRecord {
this := AlertRecord{}
setAlertRecordGetExprAttributeType(&this.Expr, expr)
setAlertRecordGetRecordAttributeType(&this.Record, record)
return &this
}
// NewAlertRecordWithDefaults instantiates a new AlertRecord 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 NewAlertRecordWithDefaults() *AlertRecord {
this := AlertRecord{}
return &this
}
// GetExpr returns the Expr field value
func (o *AlertRecord) GetExpr() (ret AlertRecordGetExprRetType) {
ret, _ = o.GetExprOk()
return ret
}
// GetExprOk returns a tuple with the Expr field value
// and a boolean to check if the value has been set.
func (o *AlertRecord) GetExprOk() (ret AlertRecordGetExprRetType, ok bool) {
return getAlertRecordGetExprAttributeTypeOk(o.Expr)
}
// SetExpr sets field value
func (o *AlertRecord) SetExpr(v AlertRecordGetExprRetType) {
setAlertRecordGetExprAttributeType(&o.Expr, v)
}
// GetLabels returns the Labels field value if set, zero value otherwise.
func (o *AlertRecord) GetLabels() (res AlertRecordGetLabelsRetType) {
res, _ = o.GetLabelsOk()
return
}
// GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AlertRecord) GetLabelsOk() (ret AlertRecordGetLabelsRetType, ok bool) {
return getAlertRecordGetLabelsAttributeTypeOk(o.Labels)
}
// HasLabels returns a boolean if a field has been set.
func (o *AlertRecord) HasLabels() bool {
_, ok := o.GetLabelsOk()
return ok
}
// SetLabels gets a reference to the given map[string]string and assigns it to the Labels field.
func (o *AlertRecord) SetLabels(v AlertRecordGetLabelsRetType) {
setAlertRecordGetLabelsAttributeType(&o.Labels, v)
}
// GetRecord returns the Record field value
func (o *AlertRecord) GetRecord() (ret AlertRecordGetRecordRetType) {
ret, _ = o.GetRecordOk()
return ret
}
// GetRecordOk returns a tuple with the Record field value
// and a boolean to check if the value has been set.
func (o *AlertRecord) GetRecordOk() (ret AlertRecordGetRecordRetType, ok bool) {
return getAlertRecordGetRecordAttributeTypeOk(o.Record)
}
// SetRecord sets field value
func (o *AlertRecord) SetRecord(v AlertRecordGetRecordRetType) {
setAlertRecordGetRecordAttributeType(&o.Record, v)
}
func (o AlertRecord) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if val, ok := getAlertRecordGetExprAttributeTypeOk(o.Expr); ok {
toSerialize["Expr"] = val
}
if val, ok := getAlertRecordGetLabelsAttributeTypeOk(o.Labels); ok {
toSerialize["Labels"] = val
}
if val, ok := getAlertRecordGetRecordAttributeTypeOk(o.Record); ok {
toSerialize["Record"] = val
}
return toSerialize, nil
}
type NullableAlertRecord struct {
value *AlertRecord
isSet bool
}
func (v NullableAlertRecord) Get() *AlertRecord {
return v.value
}
func (v *NullableAlertRecord) Set(val *AlertRecord) {
v.value = val
v.isSet = true
}
func (v NullableAlertRecord) IsSet() bool {
return v.isSet
}
func (v *NullableAlertRecord) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableAlertRecord(val *AlertRecord) *NullableAlertRecord {
return &NullableAlertRecord{value: val, isSet: true}
}
func (v NullableAlertRecord) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableAlertRecord) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}