This repository has been archived by the owner on Jun 29, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 14
/
autoscale_cluster_response.go
692 lines (511 loc) · 19.4 KB
/
autoscale_cluster_response.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
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
// Code generated by go-swagger; DO NOT EDIT.
package models_cloudbreak
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"encoding/json"
"strconv"
strfmt "github.com/go-openapi/strfmt"
"github.com/go-openapi/errors"
"github.com/go-openapi/swag"
"github.com/go-openapi/validate"
)
// AutoscaleClusterResponse autoscale cluster response
// swagger:model AutoscaleClusterResponse
type AutoscaleClusterResponse struct {
// details of the external Ambari database
AmbariDatabaseDetails *AmbariDatabaseDetails `json:"ambariDatabaseDetails,omitempty"`
// details of the Ambari package repository
AmbariRepoDetailsJSON *AmbariRepoDetails `json:"ambariRepoDetailsJson,omitempty"`
// public ambari ip of the stack
AmbariServerIP string `json:"ambariServerIp,omitempty"`
// public ambari url
AmbariServerURL string `json:"ambariServerUrl,omitempty"`
// details of the Ambari stack
AmbariStackDetails *AmbariStackDetailsResponse `json:"ambariStackDetails,omitempty"`
// Additional information for ambari cluster
Attributes map[string]interface{} `json:"attributes,omitempty"`
// blueprint for the cluster
Blueprint *BlueprintResponse `json:"blueprint,omitempty"`
// blueprint custom properties
BlueprintCustomProperties string `json:"blueprintCustomProperties,omitempty"`
// blueprint id for the cluster
BlueprintID int64 `json:"blueprintId,omitempty"`
// blueprint inputs in the cluster
// Unique: true
BlueprintInputs []*BlueprintInput `json:"blueprintInputs"`
// name of the cluster
Cluster string `json:"cluster,omitempty"`
// config recommendation strategy
ConfigStrategy string `json:"configStrategy,omitempty"`
// Epoch time of cluster creation finish
CreationFinished int64 `json:"creationFinished,omitempty"`
// custom containers
CustomContainers *CustomContainerResponse `json:"customContainers,omitempty"`
// custom queue for yarn orchestrator
CustomQueue string `json:"customQueue,omitempty"`
// description of the resource
Description string `json:"description,omitempty"`
// executor type of cluster
ExecutorType string `json:"executorType,omitempty"`
// gateway
Gateway *GatewayJSON `json:"gateway,omitempty"`
// host groups
// Unique: true
HostGroups []*HostGroupResponse `json:"hostGroups"`
// duration - how long the cluster is running in hours
HoursUp int32 `json:"hoursUp,omitempty"`
// id of the resource
ID int64 `json:"id,omitempty"`
// LDAP config for the cluster
LdapConfig *LdapConfigResponse `json:"ldapConfig,omitempty"`
// LDAP config id for the cluster
LdapConfigID int64 `json:"ldapConfigId,omitempty"`
// duration - how long the cluster is running in minutes (minus hours)
MinutesUp int32 `json:"minutesUp,omitempty"`
// name of the resource
Name string `json:"name,omitempty"`
// ambari password
Password string `json:"password,omitempty"`
// RDS configuration ids for the cluster
// Unique: true
RdsConfigIds []int64 `json:"rdsConfigIds"`
// RDS configurations for the cluster
// Unique: true
RdsConfigs []*RDSConfigResponse `json:"rdsConfigs"`
// secure
Secure *bool `json:"secure,omitempty"`
// most important services in the cluster
ServiceEndPoints map[string]string `json:"serviceEndPoints,omitempty"`
// status of the cluster
Status string `json:"status,omitempty"`
// status message of the cluster
StatusReason string `json:"statusReason,omitempty"`
// ambari username
UserName string `json:"userName,omitempty"`
}
/* polymorph AutoscaleClusterResponse ambariDatabaseDetails false */
/* polymorph AutoscaleClusterResponse ambariRepoDetailsJson false */
/* polymorph AutoscaleClusterResponse ambariServerIp false */
/* polymorph AutoscaleClusterResponse ambariServerUrl false */
/* polymorph AutoscaleClusterResponse ambariStackDetails false */
/* polymorph AutoscaleClusterResponse attributes false */
/* polymorph AutoscaleClusterResponse blueprint false */
/* polymorph AutoscaleClusterResponse blueprintCustomProperties false */
/* polymorph AutoscaleClusterResponse blueprintId false */
/* polymorph AutoscaleClusterResponse blueprintInputs false */
/* polymorph AutoscaleClusterResponse cluster false */
/* polymorph AutoscaleClusterResponse configStrategy false */
/* polymorph AutoscaleClusterResponse creationFinished false */
/* polymorph AutoscaleClusterResponse customContainers false */
/* polymorph AutoscaleClusterResponse customQueue false */
/* polymorph AutoscaleClusterResponse description false */
/* polymorph AutoscaleClusterResponse executorType false */
/* polymorph AutoscaleClusterResponse gateway false */
/* polymorph AutoscaleClusterResponse hostGroups false */
/* polymorph AutoscaleClusterResponse hoursUp false */
/* polymorph AutoscaleClusterResponse id false */
/* polymorph AutoscaleClusterResponse ldapConfig false */
/* polymorph AutoscaleClusterResponse ldapConfigId false */
/* polymorph AutoscaleClusterResponse minutesUp false */
/* polymorph AutoscaleClusterResponse name false */
/* polymorph AutoscaleClusterResponse password false */
/* polymorph AutoscaleClusterResponse rdsConfigIds false */
/* polymorph AutoscaleClusterResponse rdsConfigs false */
/* polymorph AutoscaleClusterResponse secure false */
/* polymorph AutoscaleClusterResponse serviceEndPoints false */
/* polymorph AutoscaleClusterResponse status false */
/* polymorph AutoscaleClusterResponse statusReason false */
/* polymorph AutoscaleClusterResponse userName false */
// Validate validates this autoscale cluster response
func (m *AutoscaleClusterResponse) Validate(formats strfmt.Registry) error {
var res []error
if err := m.validateAmbariDatabaseDetails(formats); err != nil {
// prop
res = append(res, err)
}
if err := m.validateAmbariRepoDetailsJSON(formats); err != nil {
// prop
res = append(res, err)
}
if err := m.validateAmbariStackDetails(formats); err != nil {
// prop
res = append(res, err)
}
if err := m.validateBlueprint(formats); err != nil {
// prop
res = append(res, err)
}
if err := m.validateBlueprintInputs(formats); err != nil {
// prop
res = append(res, err)
}
if err := m.validateConfigStrategy(formats); err != nil {
// prop
res = append(res, err)
}
if err := m.validateCustomContainers(formats); err != nil {
// prop
res = append(res, err)
}
if err := m.validateExecutorType(formats); err != nil {
// prop
res = append(res, err)
}
if err := m.validateGateway(formats); err != nil {
// prop
res = append(res, err)
}
if err := m.validateHostGroups(formats); err != nil {
// prop
res = append(res, err)
}
if err := m.validateLdapConfig(formats); err != nil {
// prop
res = append(res, err)
}
if err := m.validateRdsConfigIds(formats); err != nil {
// prop
res = append(res, err)
}
if err := m.validateRdsConfigs(formats); err != nil {
// prop
res = append(res, err)
}
if err := m.validateStatus(formats); err != nil {
// prop
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *AutoscaleClusterResponse) validateAmbariDatabaseDetails(formats strfmt.Registry) error {
if swag.IsZero(m.AmbariDatabaseDetails) { // not required
return nil
}
if m.AmbariDatabaseDetails != nil {
if err := m.AmbariDatabaseDetails.Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("ambariDatabaseDetails")
}
return err
}
}
return nil
}
func (m *AutoscaleClusterResponse) validateAmbariRepoDetailsJSON(formats strfmt.Registry) error {
if swag.IsZero(m.AmbariRepoDetailsJSON) { // not required
return nil
}
if m.AmbariRepoDetailsJSON != nil {
if err := m.AmbariRepoDetailsJSON.Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("ambariRepoDetailsJson")
}
return err
}
}
return nil
}
func (m *AutoscaleClusterResponse) validateAmbariStackDetails(formats strfmt.Registry) error {
if swag.IsZero(m.AmbariStackDetails) { // not required
return nil
}
if m.AmbariStackDetails != nil {
if err := m.AmbariStackDetails.Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("ambariStackDetails")
}
return err
}
}
return nil
}
func (m *AutoscaleClusterResponse) validateBlueprint(formats strfmt.Registry) error {
if swag.IsZero(m.Blueprint) { // not required
return nil
}
if m.Blueprint != nil {
if err := m.Blueprint.Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("blueprint")
}
return err
}
}
return nil
}
func (m *AutoscaleClusterResponse) validateBlueprintInputs(formats strfmt.Registry) error {
if swag.IsZero(m.BlueprintInputs) { // not required
return nil
}
if err := validate.UniqueItems("blueprintInputs", "body", m.BlueprintInputs); err != nil {
return err
}
for i := 0; i < len(m.BlueprintInputs); i++ {
if swag.IsZero(m.BlueprintInputs[i]) { // not required
continue
}
if m.BlueprintInputs[i] != nil {
if err := m.BlueprintInputs[i].Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("blueprintInputs" + "." + strconv.Itoa(i))
}
return err
}
}
}
return nil
}
var autoscaleClusterResponseTypeConfigStrategyPropEnum []interface{}
func init() {
var res []string
if err := json.Unmarshal([]byte(`["NEVER_APPLY","ONLY_STACK_DEFAULTS_APPLY","ALWAYS_APPLY","ALWAYS_APPLY_DONT_OVERRIDE_CUSTOM_VALUES"]`), &res); err != nil {
panic(err)
}
for _, v := range res {
autoscaleClusterResponseTypeConfigStrategyPropEnum = append(autoscaleClusterResponseTypeConfigStrategyPropEnum, v)
}
}
const (
// AutoscaleClusterResponseConfigStrategyNEVERAPPLY captures enum value "NEVER_APPLY"
AutoscaleClusterResponseConfigStrategyNEVERAPPLY string = "NEVER_APPLY"
// AutoscaleClusterResponseConfigStrategyONLYSTACKDEFAULTSAPPLY captures enum value "ONLY_STACK_DEFAULTS_APPLY"
AutoscaleClusterResponseConfigStrategyONLYSTACKDEFAULTSAPPLY string = "ONLY_STACK_DEFAULTS_APPLY"
// AutoscaleClusterResponseConfigStrategyALWAYSAPPLY captures enum value "ALWAYS_APPLY"
AutoscaleClusterResponseConfigStrategyALWAYSAPPLY string = "ALWAYS_APPLY"
// AutoscaleClusterResponseConfigStrategyALWAYSAPPLYDONTOVERRIDECUSTOMVALUES captures enum value "ALWAYS_APPLY_DONT_OVERRIDE_CUSTOM_VALUES"
AutoscaleClusterResponseConfigStrategyALWAYSAPPLYDONTOVERRIDECUSTOMVALUES string = "ALWAYS_APPLY_DONT_OVERRIDE_CUSTOM_VALUES"
)
// prop value enum
func (m *AutoscaleClusterResponse) validateConfigStrategyEnum(path, location string, value string) error {
if err := validate.Enum(path, location, value, autoscaleClusterResponseTypeConfigStrategyPropEnum); err != nil {
return err
}
return nil
}
func (m *AutoscaleClusterResponse) validateConfigStrategy(formats strfmt.Registry) error {
if swag.IsZero(m.ConfigStrategy) { // not required
return nil
}
// value enum
if err := m.validateConfigStrategyEnum("configStrategy", "body", m.ConfigStrategy); err != nil {
return err
}
return nil
}
func (m *AutoscaleClusterResponse) validateCustomContainers(formats strfmt.Registry) error {
if swag.IsZero(m.CustomContainers) { // not required
return nil
}
if m.CustomContainers != nil {
if err := m.CustomContainers.Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("customContainers")
}
return err
}
}
return nil
}
var autoscaleClusterResponseTypeExecutorTypePropEnum []interface{}
func init() {
var res []string
if err := json.Unmarshal([]byte(`["CONTAINER","DEFAULT"]`), &res); err != nil {
panic(err)
}
for _, v := range res {
autoscaleClusterResponseTypeExecutorTypePropEnum = append(autoscaleClusterResponseTypeExecutorTypePropEnum, v)
}
}
const (
// AutoscaleClusterResponseExecutorTypeCONTAINER captures enum value "CONTAINER"
AutoscaleClusterResponseExecutorTypeCONTAINER string = "CONTAINER"
// AutoscaleClusterResponseExecutorTypeDEFAULT captures enum value "DEFAULT"
AutoscaleClusterResponseExecutorTypeDEFAULT string = "DEFAULT"
)
// prop value enum
func (m *AutoscaleClusterResponse) validateExecutorTypeEnum(path, location string, value string) error {
if err := validate.Enum(path, location, value, autoscaleClusterResponseTypeExecutorTypePropEnum); err != nil {
return err
}
return nil
}
func (m *AutoscaleClusterResponse) validateExecutorType(formats strfmt.Registry) error {
if swag.IsZero(m.ExecutorType) { // not required
return nil
}
// value enum
if err := m.validateExecutorTypeEnum("executorType", "body", m.ExecutorType); err != nil {
return err
}
return nil
}
func (m *AutoscaleClusterResponse) validateGateway(formats strfmt.Registry) error {
if swag.IsZero(m.Gateway) { // not required
return nil
}
if m.Gateway != nil {
if err := m.Gateway.Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("gateway")
}
return err
}
}
return nil
}
func (m *AutoscaleClusterResponse) validateHostGroups(formats strfmt.Registry) error {
if swag.IsZero(m.HostGroups) { // not required
return nil
}
if err := validate.UniqueItems("hostGroups", "body", m.HostGroups); err != nil {
return err
}
for i := 0; i < len(m.HostGroups); i++ {
if swag.IsZero(m.HostGroups[i]) { // not required
continue
}
if m.HostGroups[i] != nil {
if err := m.HostGroups[i].Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("hostGroups" + "." + strconv.Itoa(i))
}
return err
}
}
}
return nil
}
func (m *AutoscaleClusterResponse) validateLdapConfig(formats strfmt.Registry) error {
if swag.IsZero(m.LdapConfig) { // not required
return nil
}
if m.LdapConfig != nil {
if err := m.LdapConfig.Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("ldapConfig")
}
return err
}
}
return nil
}
func (m *AutoscaleClusterResponse) validateRdsConfigIds(formats strfmt.Registry) error {
if swag.IsZero(m.RdsConfigIds) { // not required
return nil
}
if err := validate.UniqueItems("rdsConfigIds", "body", m.RdsConfigIds); err != nil {
return err
}
return nil
}
func (m *AutoscaleClusterResponse) validateRdsConfigs(formats strfmt.Registry) error {
if swag.IsZero(m.RdsConfigs) { // not required
return nil
}
if err := validate.UniqueItems("rdsConfigs", "body", m.RdsConfigs); err != nil {
return err
}
for i := 0; i < len(m.RdsConfigs); i++ {
if swag.IsZero(m.RdsConfigs[i]) { // not required
continue
}
if m.RdsConfigs[i] != nil {
if err := m.RdsConfigs[i].Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("rdsConfigs" + "." + strconv.Itoa(i))
}
return err
}
}
}
return nil
}
var autoscaleClusterResponseTypeStatusPropEnum []interface{}
func init() {
var res []string
if err := json.Unmarshal([]byte(`["REQUESTED","CREATE_IN_PROGRESS","AVAILABLE","UPDATE_IN_PROGRESS","UPDATE_REQUESTED","UPDATE_FAILED","CREATE_FAILED","ENABLE_SECURITY_FAILED","PRE_DELETE_IN_PROGRESS","DELETE_IN_PROGRESS","DELETE_FAILED","DELETE_COMPLETED","STOPPED","STOP_REQUESTED","START_REQUESTED","STOP_IN_PROGRESS","START_IN_PROGRESS","START_FAILED","STOP_FAILED","WAIT_FOR_SYNC"]`), &res); err != nil {
panic(err)
}
for _, v := range res {
autoscaleClusterResponseTypeStatusPropEnum = append(autoscaleClusterResponseTypeStatusPropEnum, v)
}
}
const (
// AutoscaleClusterResponseStatusREQUESTED captures enum value "REQUESTED"
AutoscaleClusterResponseStatusREQUESTED string = "REQUESTED"
// AutoscaleClusterResponseStatusCREATEINPROGRESS captures enum value "CREATE_IN_PROGRESS"
AutoscaleClusterResponseStatusCREATEINPROGRESS string = "CREATE_IN_PROGRESS"
// AutoscaleClusterResponseStatusAVAILABLE captures enum value "AVAILABLE"
AutoscaleClusterResponseStatusAVAILABLE string = "AVAILABLE"
// AutoscaleClusterResponseStatusUPDATEINPROGRESS captures enum value "UPDATE_IN_PROGRESS"
AutoscaleClusterResponseStatusUPDATEINPROGRESS string = "UPDATE_IN_PROGRESS"
// AutoscaleClusterResponseStatusUPDATEREQUESTED captures enum value "UPDATE_REQUESTED"
AutoscaleClusterResponseStatusUPDATEREQUESTED string = "UPDATE_REQUESTED"
// AutoscaleClusterResponseStatusUPDATEFAILED captures enum value "UPDATE_FAILED"
AutoscaleClusterResponseStatusUPDATEFAILED string = "UPDATE_FAILED"
// AutoscaleClusterResponseStatusCREATEFAILED captures enum value "CREATE_FAILED"
AutoscaleClusterResponseStatusCREATEFAILED string = "CREATE_FAILED"
// AutoscaleClusterResponseStatusENABLESECURITYFAILED captures enum value "ENABLE_SECURITY_FAILED"
AutoscaleClusterResponseStatusENABLESECURITYFAILED string = "ENABLE_SECURITY_FAILED"
// AutoscaleClusterResponseStatusPREDELETEINPROGRESS captures enum value "PRE_DELETE_IN_PROGRESS"
AutoscaleClusterResponseStatusPREDELETEINPROGRESS string = "PRE_DELETE_IN_PROGRESS"
// AutoscaleClusterResponseStatusDELETEINPROGRESS captures enum value "DELETE_IN_PROGRESS"
AutoscaleClusterResponseStatusDELETEINPROGRESS string = "DELETE_IN_PROGRESS"
// AutoscaleClusterResponseStatusDELETEFAILED captures enum value "DELETE_FAILED"
AutoscaleClusterResponseStatusDELETEFAILED string = "DELETE_FAILED"
// AutoscaleClusterResponseStatusDELETECOMPLETED captures enum value "DELETE_COMPLETED"
AutoscaleClusterResponseStatusDELETECOMPLETED string = "DELETE_COMPLETED"
// AutoscaleClusterResponseStatusSTOPPED captures enum value "STOPPED"
AutoscaleClusterResponseStatusSTOPPED string = "STOPPED"
// AutoscaleClusterResponseStatusSTOPREQUESTED captures enum value "STOP_REQUESTED"
AutoscaleClusterResponseStatusSTOPREQUESTED string = "STOP_REQUESTED"
// AutoscaleClusterResponseStatusSTARTREQUESTED captures enum value "START_REQUESTED"
AutoscaleClusterResponseStatusSTARTREQUESTED string = "START_REQUESTED"
// AutoscaleClusterResponseStatusSTOPINPROGRESS captures enum value "STOP_IN_PROGRESS"
AutoscaleClusterResponseStatusSTOPINPROGRESS string = "STOP_IN_PROGRESS"
// AutoscaleClusterResponseStatusSTARTINPROGRESS captures enum value "START_IN_PROGRESS"
AutoscaleClusterResponseStatusSTARTINPROGRESS string = "START_IN_PROGRESS"
// AutoscaleClusterResponseStatusSTARTFAILED captures enum value "START_FAILED"
AutoscaleClusterResponseStatusSTARTFAILED string = "START_FAILED"
// AutoscaleClusterResponseStatusSTOPFAILED captures enum value "STOP_FAILED"
AutoscaleClusterResponseStatusSTOPFAILED string = "STOP_FAILED"
// AutoscaleClusterResponseStatusWAITFORSYNC captures enum value "WAIT_FOR_SYNC"
AutoscaleClusterResponseStatusWAITFORSYNC string = "WAIT_FOR_SYNC"
)
// prop value enum
func (m *AutoscaleClusterResponse) validateStatusEnum(path, location string, value string) error {
if err := validate.Enum(path, location, value, autoscaleClusterResponseTypeStatusPropEnum); err != nil {
return err
}
return nil
}
func (m *AutoscaleClusterResponse) validateStatus(formats strfmt.Registry) error {
if swag.IsZero(m.Status) { // not required
return nil
}
// value enum
if err := m.validateStatusEnum("status", "body", m.Status); err != nil {
return err
}
return nil
}
// MarshalBinary interface implementation
func (m *AutoscaleClusterResponse) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *AutoscaleClusterResponse) UnmarshalBinary(b []byte) error {
var res AutoscaleClusterResponse
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}