/
model_v202101beta1_test_health.go
293 lines (248 loc) · 8.55 KB
/
model_v202101beta1_test_health.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
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
/*
* Synthetics Monitoring API
*
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* API version: 202101beta1
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package synthetics
import (
"encoding/json"
)
// V202101beta1TestHealth struct for V202101beta1TestHealth
type V202101beta1TestHealth struct {
TestId *string `json:"testId,omitempty"`
Tasks *[]V202101beta1TaskHealth `json:"tasks,omitempty"`
OverallHealth *V202101beta1Health `json:"overallHealth,omitempty"`
HealthTs *[]V202101beta1Health `json:"healthTs,omitempty"`
AgentTaskConfig *[]V202101beta1AgentTaskConfig `json:"agentTaskConfig,omitempty"`
Mesh *[]V202101beta1MeshResponse `json:"mesh,omitempty"`
}
// NewV202101beta1TestHealth instantiates a new V202101beta1TestHealth 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 NewV202101beta1TestHealth() *V202101beta1TestHealth {
this := V202101beta1TestHealth{}
return &this
}
// NewV202101beta1TestHealthWithDefaults instantiates a new V202101beta1TestHealth 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 NewV202101beta1TestHealthWithDefaults() *V202101beta1TestHealth {
this := V202101beta1TestHealth{}
return &this
}
// GetTestId returns the TestId field value if set, zero value otherwise.
func (o *V202101beta1TestHealth) GetTestId() string {
if o == nil || o.TestId == nil {
var ret string
return ret
}
return *o.TestId
}
// GetTestIdOk returns a tuple with the TestId field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *V202101beta1TestHealth) GetTestIdOk() (*string, bool) {
if o == nil || o.TestId == nil {
return nil, false
}
return o.TestId, true
}
// HasTestId returns a boolean if a field has been set.
func (o *V202101beta1TestHealth) HasTestId() bool {
if o != nil && o.TestId != nil {
return true
}
return false
}
// SetTestId gets a reference to the given string and assigns it to the TestId field.
func (o *V202101beta1TestHealth) SetTestId(v string) {
o.TestId = &v
}
// GetTasks returns the Tasks field value if set, zero value otherwise.
func (o *V202101beta1TestHealth) GetTasks() []V202101beta1TaskHealth {
if o == nil || o.Tasks == nil {
var ret []V202101beta1TaskHealth
return ret
}
return *o.Tasks
}
// GetTasksOk returns a tuple with the Tasks field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *V202101beta1TestHealth) GetTasksOk() (*[]V202101beta1TaskHealth, bool) {
if o == nil || o.Tasks == nil {
return nil, false
}
return o.Tasks, true
}
// HasTasks returns a boolean if a field has been set.
func (o *V202101beta1TestHealth) HasTasks() bool {
if o != nil && o.Tasks != nil {
return true
}
return false
}
// SetTasks gets a reference to the given []V202101beta1TaskHealth and assigns it to the Tasks field.
func (o *V202101beta1TestHealth) SetTasks(v []V202101beta1TaskHealth) {
o.Tasks = &v
}
// GetOverallHealth returns the OverallHealth field value if set, zero value otherwise.
func (o *V202101beta1TestHealth) GetOverallHealth() V202101beta1Health {
if o == nil || o.OverallHealth == nil {
var ret V202101beta1Health
return ret
}
return *o.OverallHealth
}
// GetOverallHealthOk returns a tuple with the OverallHealth field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *V202101beta1TestHealth) GetOverallHealthOk() (*V202101beta1Health, bool) {
if o == nil || o.OverallHealth == nil {
return nil, false
}
return o.OverallHealth, true
}
// HasOverallHealth returns a boolean if a field has been set.
func (o *V202101beta1TestHealth) HasOverallHealth() bool {
if o != nil && o.OverallHealth != nil {
return true
}
return false
}
// SetOverallHealth gets a reference to the given V202101beta1Health and assigns it to the OverallHealth field.
func (o *V202101beta1TestHealth) SetOverallHealth(v V202101beta1Health) {
o.OverallHealth = &v
}
// GetHealthTs returns the HealthTs field value if set, zero value otherwise.
func (o *V202101beta1TestHealth) GetHealthTs() []V202101beta1Health {
if o == nil || o.HealthTs == nil {
var ret []V202101beta1Health
return ret
}
return *o.HealthTs
}
// GetHealthTsOk returns a tuple with the HealthTs field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *V202101beta1TestHealth) GetHealthTsOk() (*[]V202101beta1Health, bool) {
if o == nil || o.HealthTs == nil {
return nil, false
}
return o.HealthTs, true
}
// HasHealthTs returns a boolean if a field has been set.
func (o *V202101beta1TestHealth) HasHealthTs() bool {
if o != nil && o.HealthTs != nil {
return true
}
return false
}
// SetHealthTs gets a reference to the given []V202101beta1Health and assigns it to the HealthTs field.
func (o *V202101beta1TestHealth) SetHealthTs(v []V202101beta1Health) {
o.HealthTs = &v
}
// GetAgentTaskConfig returns the AgentTaskConfig field value if set, zero value otherwise.
func (o *V202101beta1TestHealth) GetAgentTaskConfig() []V202101beta1AgentTaskConfig {
if o == nil || o.AgentTaskConfig == nil {
var ret []V202101beta1AgentTaskConfig
return ret
}
return *o.AgentTaskConfig
}
// GetAgentTaskConfigOk returns a tuple with the AgentTaskConfig field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *V202101beta1TestHealth) GetAgentTaskConfigOk() (*[]V202101beta1AgentTaskConfig, bool) {
if o == nil || o.AgentTaskConfig == nil {
return nil, false
}
return o.AgentTaskConfig, true
}
// HasAgentTaskConfig returns a boolean if a field has been set.
func (o *V202101beta1TestHealth) HasAgentTaskConfig() bool {
if o != nil && o.AgentTaskConfig != nil {
return true
}
return false
}
// SetAgentTaskConfig gets a reference to the given []V202101beta1AgentTaskConfig and assigns it to the AgentTaskConfig field.
func (o *V202101beta1TestHealth) SetAgentTaskConfig(v []V202101beta1AgentTaskConfig) {
o.AgentTaskConfig = &v
}
// GetMesh returns the Mesh field value if set, zero value otherwise.
func (o *V202101beta1TestHealth) GetMesh() []V202101beta1MeshResponse {
if o == nil || o.Mesh == nil {
var ret []V202101beta1MeshResponse
return ret
}
return *o.Mesh
}
// GetMeshOk returns a tuple with the Mesh field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *V202101beta1TestHealth) GetMeshOk() (*[]V202101beta1MeshResponse, bool) {
if o == nil || o.Mesh == nil {
return nil, false
}
return o.Mesh, true
}
// HasMesh returns a boolean if a field has been set.
func (o *V202101beta1TestHealth) HasMesh() bool {
if o != nil && o.Mesh != nil {
return true
}
return false
}
// SetMesh gets a reference to the given []V202101beta1MeshResponse and assigns it to the Mesh field.
func (o *V202101beta1TestHealth) SetMesh(v []V202101beta1MeshResponse) {
o.Mesh = &v
}
func (o V202101beta1TestHealth) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if o.TestId != nil {
toSerialize["testId"] = o.TestId
}
if o.Tasks != nil {
toSerialize["tasks"] = o.Tasks
}
if o.OverallHealth != nil {
toSerialize["overallHealth"] = o.OverallHealth
}
if o.HealthTs != nil {
toSerialize["healthTs"] = o.HealthTs
}
if o.AgentTaskConfig != nil {
toSerialize["agentTaskConfig"] = o.AgentTaskConfig
}
if o.Mesh != nil {
toSerialize["mesh"] = o.Mesh
}
return json.Marshal(toSerialize)
}
type NullableV202101beta1TestHealth struct {
value *V202101beta1TestHealth
isSet bool
}
func (v NullableV202101beta1TestHealth) Get() *V202101beta1TestHealth {
return v.value
}
func (v *NullableV202101beta1TestHealth) Set(val *V202101beta1TestHealth) {
v.value = val
v.isSet = true
}
func (v NullableV202101beta1TestHealth) IsSet() bool {
return v.isSet
}
func (v *NullableV202101beta1TestHealth) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableV202101beta1TestHealth(val *V202101beta1TestHealth) *NullableV202101beta1TestHealth {
return &NullableV202101beta1TestHealth{value: val, isSet: true}
}
func (v NullableV202101beta1TestHealth) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableV202101beta1TestHealth) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}