-
Notifications
You must be signed in to change notification settings - Fork 0
/
condition.go
418 lines (302 loc) · 17.7 KB
/
condition.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
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
// Code generated by go-swagger; DO NOT EDIT.
package dynatrace
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"bytes"
"encoding/json"
"io"
"github.com/go-openapi/errors"
"github.com/go-openapi/runtime"
strfmt "github.com/go-openapi/strfmt"
"github.com/go-openapi/swag"
"github.com/go-openapi/validate"
)
// Condition A condition of a rule usage.
// swagger:model Condition
type Condition struct {
// The attribute to be matched.
// Required: true
// Enum: [ACTOR_SYSTEM AKKA_ACTOR_CLASS_NAME AKKA_ACTOR_MESSAGE_TYPE AKKA_ACTOR_PATH AZURE_FUNCTIONS_FUNCTION_NAME AZURE_FUNCTIONS_SITE_NAME CICS_PROGRAM_NAME CICS_SYSTEM_ID CICS_TASK_ID CICS_TRANSACTION_ID CPU_TIME CTG_GATEWAY_URL CTG_PROGRAM CTG_SERVER_NAME CTG_TRANSACTION_ID CUSTOMSERVICE_CLASS CUSTOMSERVICE_METHOD DATABASE_CHILD_CALL_COUNT DATABASE_CHILD_CALL_TIME ERROR_COUNT ESB_APPLICATION_NAME ESB_INPUT_TYPE ESB_LIBRARY_NAME ESB_MESSAGE_FLOW_NAME EXCEPTION_CLASS EXCEPTION_MESSAGE FAILED_STATE FAILURE_REASON FLAW_STATE HTTP_REQUEST_METHOD HTTP_STATUS HTTP_STATUS_CLASS IMS_PROGRAM_NAME IMS_TRANSACTION_ID IO_TIME LOCK_TIME MESSAGING_DESTINATION_TYPE MESSAGING_IS_TEMPORARY_QUEUE MESSAGING_QUEUE_NAME MESSAGING_QUEUE_VENDOR NON_DATABASE_CHILD_CALL_COUNT NON_DATABASE_CHILD_CALL_TIME PROCESS_GROUP_NAME PROCESS_GROUP_TAG REMOTE_ENDPOINT REMOTE_METHOD REMOTE_SERVICE_NAME REQUEST_NAME REQUEST_TYPE RESPONSE_TIME RESPONSE_TIME_CLIENT RMI_CLASS RMI_METHOD SERVICE_DISPLAY_NAME SERVICE_NAME SERVICE_PORT SERVICE_PUBLIC_DOMAIN_NAME SERVICE_REQUEST_ATTRIBUTE SERVICE_TAG SERVICE_TYPE SERVICE_WEB_APPLICATION_ID SERVICE_WEB_CONTEXT_ROOT SERVICE_WEB_SERVER_NAME SERVICE_WEB_SERVICE_NAME SERVICE_WEB_SERVICE_NAMESPACE SUSPENSION_TIME TOTAL_PROCESSING_TIME WAIT_TIME WEBREQUEST_QUERY WEBREQUEST_URL WEBREQUEST_URL_HOST WEBREQUEST_URL_PATH WEBREQUEST_URL_PORT WEBSERVICE_ENDPOINT WEBSERVICE_METHOD ZOS_CALL_TYPE]
Attribute *string `json:"attribute"`
comparisonInfoField ComparisonInfo
}
// ComparisonInfo gets the comparison info of this base type
func (m *Condition) ComparisonInfo() ComparisonInfo {
return m.comparisonInfoField
}
// SetComparisonInfo sets the comparison info of this base type
func (m *Condition) SetComparisonInfo(val ComparisonInfo) {
m.comparisonInfoField = val
}
// UnmarshalJSON unmarshals this object with a polymorphic type from a JSON structure
func (m *Condition) UnmarshalJSON(raw []byte) error {
var data struct {
Attribute *string `json:"attribute"`
ComparisonInfo json.RawMessage `json:"comparisonInfo"`
}
buf := bytes.NewBuffer(raw)
dec := json.NewDecoder(buf)
dec.UseNumber()
if err := dec.Decode(&data); err != nil {
return err
}
propComparisonInfo, err := UnmarshalComparisonInfo(bytes.NewBuffer(data.ComparisonInfo), runtime.JSONConsumer())
if err != nil && err != io.EOF {
return err
}
var result Condition
// attribute
result.Attribute = data.Attribute
// comparisonInfo
result.comparisonInfoField = propComparisonInfo
*m = result
return nil
}
// MarshalJSON marshals this object with a polymorphic type to a JSON structure
func (m Condition) MarshalJSON() ([]byte, error) {
var b1, b2, b3 []byte
var err error
b1, err = json.Marshal(struct {
Attribute *string `json:"attribute"`
}{
Attribute: m.Attribute,
},
)
if err != nil {
return nil, err
}
b2, err = json.Marshal(struct {
ComparisonInfo ComparisonInfo `json:"comparisonInfo"`
}{
ComparisonInfo: m.comparisonInfoField,
},
)
if err != nil {
return nil, err
}
return swag.ConcatJSON(b1, b2, b3), nil
}
// Validate validates this condition
func (m *Condition) Validate(formats strfmt.Registry) error {
var res []error
if err := m.validateAttribute(formats); err != nil {
res = append(res, err)
}
if err := m.validateComparisonInfo(formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
var conditionTypeAttributePropEnum []interface{}
func init() {
var res []string
if err := json.Unmarshal([]byte(`["ACTOR_SYSTEM","AKKA_ACTOR_CLASS_NAME","AKKA_ACTOR_MESSAGE_TYPE","AKKA_ACTOR_PATH","AZURE_FUNCTIONS_FUNCTION_NAME","AZURE_FUNCTIONS_SITE_NAME","CICS_PROGRAM_NAME","CICS_SYSTEM_ID","CICS_TASK_ID","CICS_TRANSACTION_ID","CPU_TIME","CTG_GATEWAY_URL","CTG_PROGRAM","CTG_SERVER_NAME","CTG_TRANSACTION_ID","CUSTOMSERVICE_CLASS","CUSTOMSERVICE_METHOD","DATABASE_CHILD_CALL_COUNT","DATABASE_CHILD_CALL_TIME","ERROR_COUNT","ESB_APPLICATION_NAME","ESB_INPUT_TYPE","ESB_LIBRARY_NAME","ESB_MESSAGE_FLOW_NAME","EXCEPTION_CLASS","EXCEPTION_MESSAGE","FAILED_STATE","FAILURE_REASON","FLAW_STATE","HTTP_REQUEST_METHOD","HTTP_STATUS","HTTP_STATUS_CLASS","IMS_PROGRAM_NAME","IMS_TRANSACTION_ID","IO_TIME","LOCK_TIME","MESSAGING_DESTINATION_TYPE","MESSAGING_IS_TEMPORARY_QUEUE","MESSAGING_QUEUE_NAME","MESSAGING_QUEUE_VENDOR","NON_DATABASE_CHILD_CALL_COUNT","NON_DATABASE_CHILD_CALL_TIME","PROCESS_GROUP_NAME","PROCESS_GROUP_TAG","REMOTE_ENDPOINT","REMOTE_METHOD","REMOTE_SERVICE_NAME","REQUEST_NAME","REQUEST_TYPE","RESPONSE_TIME","RESPONSE_TIME_CLIENT","RMI_CLASS","RMI_METHOD","SERVICE_DISPLAY_NAME","SERVICE_NAME","SERVICE_PORT","SERVICE_PUBLIC_DOMAIN_NAME","SERVICE_REQUEST_ATTRIBUTE","SERVICE_TAG","SERVICE_TYPE","SERVICE_WEB_APPLICATION_ID","SERVICE_WEB_CONTEXT_ROOT","SERVICE_WEB_SERVER_NAME","SERVICE_WEB_SERVICE_NAME","SERVICE_WEB_SERVICE_NAMESPACE","SUSPENSION_TIME","TOTAL_PROCESSING_TIME","WAIT_TIME","WEBREQUEST_QUERY","WEBREQUEST_URL","WEBREQUEST_URL_HOST","WEBREQUEST_URL_PATH","WEBREQUEST_URL_PORT","WEBSERVICE_ENDPOINT","WEBSERVICE_METHOD","ZOS_CALL_TYPE"]`), &res); err != nil {
panic(err)
}
for _, v := range res {
conditionTypeAttributePropEnum = append(conditionTypeAttributePropEnum, v)
}
}
const (
// ConditionAttributeACTORSYSTEM captures enum value "ACTOR_SYSTEM"
ConditionAttributeACTORSYSTEM string = "ACTOR_SYSTEM"
// ConditionAttributeAKKAACTORCLASSNAME captures enum value "AKKA_ACTOR_CLASS_NAME"
ConditionAttributeAKKAACTORCLASSNAME string = "AKKA_ACTOR_CLASS_NAME"
// ConditionAttributeAKKAACTORMESSAGETYPE captures enum value "AKKA_ACTOR_MESSAGE_TYPE"
ConditionAttributeAKKAACTORMESSAGETYPE string = "AKKA_ACTOR_MESSAGE_TYPE"
// ConditionAttributeAKKAACTORPATH captures enum value "AKKA_ACTOR_PATH"
ConditionAttributeAKKAACTORPATH string = "AKKA_ACTOR_PATH"
// ConditionAttributeAZUREFUNCTIONSFUNCTIONNAME captures enum value "AZURE_FUNCTIONS_FUNCTION_NAME"
ConditionAttributeAZUREFUNCTIONSFUNCTIONNAME string = "AZURE_FUNCTIONS_FUNCTION_NAME"
// ConditionAttributeAZUREFUNCTIONSSITENAME captures enum value "AZURE_FUNCTIONS_SITE_NAME"
ConditionAttributeAZUREFUNCTIONSSITENAME string = "AZURE_FUNCTIONS_SITE_NAME"
// ConditionAttributeCICSPROGRAMNAME captures enum value "CICS_PROGRAM_NAME"
ConditionAttributeCICSPROGRAMNAME string = "CICS_PROGRAM_NAME"
// ConditionAttributeCICSSYSTEMID captures enum value "CICS_SYSTEM_ID"
ConditionAttributeCICSSYSTEMID string = "CICS_SYSTEM_ID"
// ConditionAttributeCICSTASKID captures enum value "CICS_TASK_ID"
ConditionAttributeCICSTASKID string = "CICS_TASK_ID"
// ConditionAttributeCICSTRANSACTIONID captures enum value "CICS_TRANSACTION_ID"
ConditionAttributeCICSTRANSACTIONID string = "CICS_TRANSACTION_ID"
// ConditionAttributeCPUTIME captures enum value "CPU_TIME"
ConditionAttributeCPUTIME string = "CPU_TIME"
// ConditionAttributeCTGGATEWAYURL captures enum value "CTG_GATEWAY_URL"
ConditionAttributeCTGGATEWAYURL string = "CTG_GATEWAY_URL"
// ConditionAttributeCTGPROGRAM captures enum value "CTG_PROGRAM"
ConditionAttributeCTGPROGRAM string = "CTG_PROGRAM"
// ConditionAttributeCTGSERVERNAME captures enum value "CTG_SERVER_NAME"
ConditionAttributeCTGSERVERNAME string = "CTG_SERVER_NAME"
// ConditionAttributeCTGTRANSACTIONID captures enum value "CTG_TRANSACTION_ID"
ConditionAttributeCTGTRANSACTIONID string = "CTG_TRANSACTION_ID"
// ConditionAttributeCUSTOMSERVICECLASS captures enum value "CUSTOMSERVICE_CLASS"
ConditionAttributeCUSTOMSERVICECLASS string = "CUSTOMSERVICE_CLASS"
// ConditionAttributeCUSTOMSERVICEMETHOD captures enum value "CUSTOMSERVICE_METHOD"
ConditionAttributeCUSTOMSERVICEMETHOD string = "CUSTOMSERVICE_METHOD"
// ConditionAttributeDATABASECHILDCALLCOUNT captures enum value "DATABASE_CHILD_CALL_COUNT"
ConditionAttributeDATABASECHILDCALLCOUNT string = "DATABASE_CHILD_CALL_COUNT"
// ConditionAttributeDATABASECHILDCALLTIME captures enum value "DATABASE_CHILD_CALL_TIME"
ConditionAttributeDATABASECHILDCALLTIME string = "DATABASE_CHILD_CALL_TIME"
// ConditionAttributeERRORCOUNT captures enum value "ERROR_COUNT"
ConditionAttributeERRORCOUNT string = "ERROR_COUNT"
// ConditionAttributeESBAPPLICATIONNAME captures enum value "ESB_APPLICATION_NAME"
ConditionAttributeESBAPPLICATIONNAME string = "ESB_APPLICATION_NAME"
// ConditionAttributeESBINPUTTYPE captures enum value "ESB_INPUT_TYPE"
ConditionAttributeESBINPUTTYPE string = "ESB_INPUT_TYPE"
// ConditionAttributeESBLIBRARYNAME captures enum value "ESB_LIBRARY_NAME"
ConditionAttributeESBLIBRARYNAME string = "ESB_LIBRARY_NAME"
// ConditionAttributeESBMESSAGEFLOWNAME captures enum value "ESB_MESSAGE_FLOW_NAME"
ConditionAttributeESBMESSAGEFLOWNAME string = "ESB_MESSAGE_FLOW_NAME"
// ConditionAttributeEXCEPTIONCLASS captures enum value "EXCEPTION_CLASS"
ConditionAttributeEXCEPTIONCLASS string = "EXCEPTION_CLASS"
// ConditionAttributeEXCEPTIONMESSAGE captures enum value "EXCEPTION_MESSAGE"
ConditionAttributeEXCEPTIONMESSAGE string = "EXCEPTION_MESSAGE"
// ConditionAttributeFAILEDSTATE captures enum value "FAILED_STATE"
ConditionAttributeFAILEDSTATE string = "FAILED_STATE"
// ConditionAttributeFAILUREREASON captures enum value "FAILURE_REASON"
ConditionAttributeFAILUREREASON string = "FAILURE_REASON"
// ConditionAttributeFLAWSTATE captures enum value "FLAW_STATE"
ConditionAttributeFLAWSTATE string = "FLAW_STATE"
// ConditionAttributeHTTPREQUESTMETHOD captures enum value "HTTP_REQUEST_METHOD"
ConditionAttributeHTTPREQUESTMETHOD string = "HTTP_REQUEST_METHOD"
// ConditionAttributeHTTPSTATUS captures enum value "HTTP_STATUS"
ConditionAttributeHTTPSTATUS string = "HTTP_STATUS"
// ConditionAttributeHTTPSTATUSCLASS captures enum value "HTTP_STATUS_CLASS"
ConditionAttributeHTTPSTATUSCLASS string = "HTTP_STATUS_CLASS"
// ConditionAttributeIMSPROGRAMNAME captures enum value "IMS_PROGRAM_NAME"
ConditionAttributeIMSPROGRAMNAME string = "IMS_PROGRAM_NAME"
// ConditionAttributeIMSTRANSACTIONID captures enum value "IMS_TRANSACTION_ID"
ConditionAttributeIMSTRANSACTIONID string = "IMS_TRANSACTION_ID"
// ConditionAttributeIOTIME captures enum value "IO_TIME"
ConditionAttributeIOTIME string = "IO_TIME"
// ConditionAttributeLOCKTIME captures enum value "LOCK_TIME"
ConditionAttributeLOCKTIME string = "LOCK_TIME"
// ConditionAttributeMESSAGINGDESTINATIONTYPE captures enum value "MESSAGING_DESTINATION_TYPE"
ConditionAttributeMESSAGINGDESTINATIONTYPE string = "MESSAGING_DESTINATION_TYPE"
// ConditionAttributeMESSAGINGISTEMPORARYQUEUE captures enum value "MESSAGING_IS_TEMPORARY_QUEUE"
ConditionAttributeMESSAGINGISTEMPORARYQUEUE string = "MESSAGING_IS_TEMPORARY_QUEUE"
// ConditionAttributeMESSAGINGQUEUENAME captures enum value "MESSAGING_QUEUE_NAME"
ConditionAttributeMESSAGINGQUEUENAME string = "MESSAGING_QUEUE_NAME"
// ConditionAttributeMESSAGINGQUEUEVENDOR captures enum value "MESSAGING_QUEUE_VENDOR"
ConditionAttributeMESSAGINGQUEUEVENDOR string = "MESSAGING_QUEUE_VENDOR"
// ConditionAttributeNONDATABASECHILDCALLCOUNT captures enum value "NON_DATABASE_CHILD_CALL_COUNT"
ConditionAttributeNONDATABASECHILDCALLCOUNT string = "NON_DATABASE_CHILD_CALL_COUNT"
// ConditionAttributeNONDATABASECHILDCALLTIME captures enum value "NON_DATABASE_CHILD_CALL_TIME"
ConditionAttributeNONDATABASECHILDCALLTIME string = "NON_DATABASE_CHILD_CALL_TIME"
// ConditionAttributePROCESSGROUPNAME captures enum value "PROCESS_GROUP_NAME"
ConditionAttributePROCESSGROUPNAME string = "PROCESS_GROUP_NAME"
// ConditionAttributePROCESSGROUPTAG captures enum value "PROCESS_GROUP_TAG"
ConditionAttributePROCESSGROUPTAG string = "PROCESS_GROUP_TAG"
// ConditionAttributeREMOTEENDPOINT captures enum value "REMOTE_ENDPOINT"
ConditionAttributeREMOTEENDPOINT string = "REMOTE_ENDPOINT"
// ConditionAttributeREMOTEMETHOD captures enum value "REMOTE_METHOD"
ConditionAttributeREMOTEMETHOD string = "REMOTE_METHOD"
// ConditionAttributeREMOTESERVICENAME captures enum value "REMOTE_SERVICE_NAME"
ConditionAttributeREMOTESERVICENAME string = "REMOTE_SERVICE_NAME"
// ConditionAttributeREQUESTNAME captures enum value "REQUEST_NAME"
ConditionAttributeREQUESTNAME string = "REQUEST_NAME"
// ConditionAttributeREQUESTTYPE captures enum value "REQUEST_TYPE"
ConditionAttributeREQUESTTYPE string = "REQUEST_TYPE"
// ConditionAttributeRESPONSETIME captures enum value "RESPONSE_TIME"
ConditionAttributeRESPONSETIME string = "RESPONSE_TIME"
// ConditionAttributeRESPONSETIMECLIENT captures enum value "RESPONSE_TIME_CLIENT"
ConditionAttributeRESPONSETIMECLIENT string = "RESPONSE_TIME_CLIENT"
// ConditionAttributeRMICLASS captures enum value "RMI_CLASS"
ConditionAttributeRMICLASS string = "RMI_CLASS"
// ConditionAttributeRMIMETHOD captures enum value "RMI_METHOD"
ConditionAttributeRMIMETHOD string = "RMI_METHOD"
// ConditionAttributeSERVICEDISPLAYNAME captures enum value "SERVICE_DISPLAY_NAME"
ConditionAttributeSERVICEDISPLAYNAME string = "SERVICE_DISPLAY_NAME"
// ConditionAttributeSERVICENAME captures enum value "SERVICE_NAME"
ConditionAttributeSERVICENAME string = "SERVICE_NAME"
// ConditionAttributeSERVICEPORT captures enum value "SERVICE_PORT"
ConditionAttributeSERVICEPORT string = "SERVICE_PORT"
// ConditionAttributeSERVICEPUBLICDOMAINNAME captures enum value "SERVICE_PUBLIC_DOMAIN_NAME"
ConditionAttributeSERVICEPUBLICDOMAINNAME string = "SERVICE_PUBLIC_DOMAIN_NAME"
// ConditionAttributeSERVICEREQUESTATTRIBUTE captures enum value "SERVICE_REQUEST_ATTRIBUTE"
ConditionAttributeSERVICEREQUESTATTRIBUTE string = "SERVICE_REQUEST_ATTRIBUTE"
// ConditionAttributeSERVICETAG captures enum value "SERVICE_TAG"
ConditionAttributeSERVICETAG string = "SERVICE_TAG"
// ConditionAttributeSERVICETYPE captures enum value "SERVICE_TYPE"
ConditionAttributeSERVICETYPE string = "SERVICE_TYPE"
// ConditionAttributeSERVICEWEBAPPLICATIONID captures enum value "SERVICE_WEB_APPLICATION_ID"
ConditionAttributeSERVICEWEBAPPLICATIONID string = "SERVICE_WEB_APPLICATION_ID"
// ConditionAttributeSERVICEWEBCONTEXTROOT captures enum value "SERVICE_WEB_CONTEXT_ROOT"
ConditionAttributeSERVICEWEBCONTEXTROOT string = "SERVICE_WEB_CONTEXT_ROOT"
// ConditionAttributeSERVICEWEBSERVERNAME captures enum value "SERVICE_WEB_SERVER_NAME"
ConditionAttributeSERVICEWEBSERVERNAME string = "SERVICE_WEB_SERVER_NAME"
// ConditionAttributeSERVICEWEBSERVICENAME captures enum value "SERVICE_WEB_SERVICE_NAME"
ConditionAttributeSERVICEWEBSERVICENAME string = "SERVICE_WEB_SERVICE_NAME"
// ConditionAttributeSERVICEWEBSERVICENAMESPACE captures enum value "SERVICE_WEB_SERVICE_NAMESPACE"
ConditionAttributeSERVICEWEBSERVICENAMESPACE string = "SERVICE_WEB_SERVICE_NAMESPACE"
// ConditionAttributeSUSPENSIONTIME captures enum value "SUSPENSION_TIME"
ConditionAttributeSUSPENSIONTIME string = "SUSPENSION_TIME"
// ConditionAttributeTOTALPROCESSINGTIME captures enum value "TOTAL_PROCESSING_TIME"
ConditionAttributeTOTALPROCESSINGTIME string = "TOTAL_PROCESSING_TIME"
// ConditionAttributeWAITTIME captures enum value "WAIT_TIME"
ConditionAttributeWAITTIME string = "WAIT_TIME"
// ConditionAttributeWEBREQUESTQUERY captures enum value "WEBREQUEST_QUERY"
ConditionAttributeWEBREQUESTQUERY string = "WEBREQUEST_QUERY"
// ConditionAttributeWEBREQUESTURL captures enum value "WEBREQUEST_URL"
ConditionAttributeWEBREQUESTURL string = "WEBREQUEST_URL"
// ConditionAttributeWEBREQUESTURLHOST captures enum value "WEBREQUEST_URL_HOST"
ConditionAttributeWEBREQUESTURLHOST string = "WEBREQUEST_URL_HOST"
// ConditionAttributeWEBREQUESTURLPATH captures enum value "WEBREQUEST_URL_PATH"
ConditionAttributeWEBREQUESTURLPATH string = "WEBREQUEST_URL_PATH"
// ConditionAttributeWEBREQUESTURLPORT captures enum value "WEBREQUEST_URL_PORT"
ConditionAttributeWEBREQUESTURLPORT string = "WEBREQUEST_URL_PORT"
// ConditionAttributeWEBSERVICEENDPOINT captures enum value "WEBSERVICE_ENDPOINT"
ConditionAttributeWEBSERVICEENDPOINT string = "WEBSERVICE_ENDPOINT"
// ConditionAttributeWEBSERVICEMETHOD captures enum value "WEBSERVICE_METHOD"
ConditionAttributeWEBSERVICEMETHOD string = "WEBSERVICE_METHOD"
// ConditionAttributeZOSCALLTYPE captures enum value "ZOS_CALL_TYPE"
ConditionAttributeZOSCALLTYPE string = "ZOS_CALL_TYPE"
)
// prop value enum
func (m *Condition) validateAttributeEnum(path, location string, value string) error {
if err := validate.Enum(path, location, value, conditionTypeAttributePropEnum); err != nil {
return err
}
return nil
}
func (m *Condition) validateAttribute(formats strfmt.Registry) error {
if err := validate.Required("attribute", "body", m.Attribute); err != nil {
return err
}
// value enum
if err := m.validateAttributeEnum("attribute", "body", *m.Attribute); err != nil {
return err
}
return nil
}
func (m *Condition) validateComparisonInfo(formats strfmt.Registry) error {
if err := validate.Required("comparisonInfo", "body", m.ComparisonInfo()); err != nil {
return err
}
if err := m.ComparisonInfo().Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("comparisonInfo")
}
return err
}
return nil
}
// MarshalBinary interface implementation
func (m *Condition) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *Condition) UnmarshalBinary(b []byte) error {
var res Condition
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}