-
Notifications
You must be signed in to change notification settings - Fork 29
Expand file tree
/
Copy pathmodel_alertrecord_response.go
More file actions
217 lines (174 loc) · 6.74 KB
/
model_alertrecord_response.go
File metadata and controls
217 lines (174 loc) · 6.74 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 AlertrecordResponse type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &AlertrecordResponse{}
/*
types and functions for expr
*/
// isNotNullableString
type AlertrecordResponseGetExprAttributeType = *string
func getAlertrecordResponseGetExprAttributeTypeOk(arg AlertrecordResponseGetExprAttributeType) (ret AlertrecordResponseGetExprRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setAlertrecordResponseGetExprAttributeType(arg *AlertrecordResponseGetExprAttributeType, val AlertrecordResponseGetExprRetType) {
*arg = &val
}
type AlertrecordResponseGetExprArgType = string
type AlertrecordResponseGetExprRetType = string
/*
types and functions for labels
*/
// isContainer
type AlertrecordResponseGetLabelsAttributeType = *map[string]string
type AlertrecordResponseGetLabelsArgType = map[string]string
type AlertrecordResponseGetLabelsRetType = map[string]string
func getAlertrecordResponseGetLabelsAttributeTypeOk(arg AlertrecordResponseGetLabelsAttributeType) (ret AlertrecordResponseGetLabelsRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setAlertrecordResponseGetLabelsAttributeType(arg *AlertrecordResponseGetLabelsAttributeType, val AlertrecordResponseGetLabelsRetType) {
*arg = &val
}
/*
types and functions for record
*/
// isNotNullableString
type AlertrecordResponseGetRecordAttributeType = *string
func getAlertrecordResponseGetRecordAttributeTypeOk(arg AlertrecordResponseGetRecordAttributeType) (ret AlertrecordResponseGetRecordRetType, ok bool) {
if arg == nil {
return ret, false
}
return *arg, true
}
func setAlertrecordResponseGetRecordAttributeType(arg *AlertrecordResponseGetRecordAttributeType, val AlertrecordResponseGetRecordRetType) {
*arg = &val
}
type AlertrecordResponseGetRecordArgType = string
type AlertrecordResponseGetRecordRetType = string
// AlertrecordResponse struct for AlertrecordResponse
type AlertrecordResponse struct {
// REQUIRED
Expr AlertrecordResponseGetExprAttributeType `json:"expr" required:"true"`
Labels AlertrecordResponseGetLabelsAttributeType `json:"labels,omitempty"`
// REQUIRED
Record AlertrecordResponseGetRecordAttributeType `json:"record" required:"true"`
}
type _AlertrecordResponse AlertrecordResponse
// NewAlertrecordResponse instantiates a new AlertrecordResponse 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 NewAlertrecordResponse(expr AlertrecordResponseGetExprArgType, record AlertrecordResponseGetRecordArgType) *AlertrecordResponse {
this := AlertrecordResponse{}
setAlertrecordResponseGetExprAttributeType(&this.Expr, expr)
setAlertrecordResponseGetRecordAttributeType(&this.Record, record)
return &this
}
// NewAlertrecordResponseWithDefaults instantiates a new AlertrecordResponse 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 NewAlertrecordResponseWithDefaults() *AlertrecordResponse {
this := AlertrecordResponse{}
return &this
}
// GetExpr returns the Expr field value
func (o *AlertrecordResponse) GetExpr() (ret AlertrecordResponseGetExprRetType) {
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 *AlertrecordResponse) GetExprOk() (ret AlertrecordResponseGetExprRetType, ok bool) {
return getAlertrecordResponseGetExprAttributeTypeOk(o.Expr)
}
// SetExpr sets field value
func (o *AlertrecordResponse) SetExpr(v AlertrecordResponseGetExprRetType) {
setAlertrecordResponseGetExprAttributeType(&o.Expr, v)
}
// GetLabels returns the Labels field value if set, zero value otherwise.
func (o *AlertrecordResponse) GetLabels() (res AlertrecordResponseGetLabelsRetType) {
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 *AlertrecordResponse) GetLabelsOk() (ret AlertrecordResponseGetLabelsRetType, ok bool) {
return getAlertrecordResponseGetLabelsAttributeTypeOk(o.Labels)
}
// HasLabels returns a boolean if a field has been set.
func (o *AlertrecordResponse) 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 *AlertrecordResponse) SetLabels(v AlertrecordResponseGetLabelsRetType) {
setAlertrecordResponseGetLabelsAttributeType(&o.Labels, v)
}
// GetRecord returns the Record field value
func (o *AlertrecordResponse) GetRecord() (ret AlertrecordResponseGetRecordRetType) {
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 *AlertrecordResponse) GetRecordOk() (ret AlertrecordResponseGetRecordRetType, ok bool) {
return getAlertrecordResponseGetRecordAttributeTypeOk(o.Record)
}
// SetRecord sets field value
func (o *AlertrecordResponse) SetRecord(v AlertrecordResponseGetRecordRetType) {
setAlertrecordResponseGetRecordAttributeType(&o.Record, v)
}
func (o AlertrecordResponse) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if val, ok := getAlertrecordResponseGetExprAttributeTypeOk(o.Expr); ok {
toSerialize["Expr"] = val
}
if val, ok := getAlertrecordResponseGetLabelsAttributeTypeOk(o.Labels); ok {
toSerialize["Labels"] = val
}
if val, ok := getAlertrecordResponseGetRecordAttributeTypeOk(o.Record); ok {
toSerialize["Record"] = val
}
return toSerialize, nil
}
type NullableAlertrecordResponse struct {
value *AlertrecordResponse
isSet bool
}
func (v NullableAlertrecordResponse) Get() *AlertrecordResponse {
return v.value
}
func (v *NullableAlertrecordResponse) Set(val *AlertrecordResponse) {
v.value = val
v.isSet = true
}
func (v NullableAlertrecordResponse) IsSet() bool {
return v.isSet
}
func (v *NullableAlertrecordResponse) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableAlertrecordResponse(val *AlertrecordResponse) *NullableAlertrecordResponse {
return &NullableAlertrecordResponse{value: val, isSet: true}
}
func (v NullableAlertrecordResponse) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableAlertrecordResponse) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}