waf_rule_config_model.go raw
1 // This file is auto-generated, don't edit it. Thanks.
2 package client
3
4 import (
5 "github.com/alibabacloud-go/tea/dara"
6 )
7
8 type iWafRuleConfig interface {
9 dara.Model
10 String() string
11 GoString() string
12 SetAction(v string) *WafRuleConfig
13 GetAction() *string
14 SetActions(v *WafRuleConfigActions) *WafRuleConfig
15 GetActions() *WafRuleConfigActions
16 SetAppPackage(v *WafRuleConfigAppPackage) *WafRuleConfig
17 GetAppPackage() *WafRuleConfigAppPackage
18 SetAppSdk(v *WafRuleConfigAppSdk) *WafRuleConfig
19 GetAppSdk() *WafRuleConfigAppSdk
20 SetExpression(v string) *WafRuleConfig
21 GetExpression() *string
22 SetId(v int64) *WafRuleConfig
23 GetId() *int64
24 SetManagedGroupId(v int64) *WafRuleConfig
25 GetManagedGroupId() *int64
26 SetManagedList(v string) *WafRuleConfig
27 GetManagedList() *string
28 SetManagedRulesets(v []*WafRuleConfigManagedRulesets) *WafRuleConfig
29 GetManagedRulesets() []*WafRuleConfigManagedRulesets
30 SetName(v string) *WafRuleConfig
31 GetName() *string
32 SetNotes(v string) *WafRuleConfig
33 GetNotes() *string
34 SetRateLimit(v *WafRuleConfigRateLimit) *WafRuleConfig
35 GetRateLimit() *WafRuleConfigRateLimit
36 SetSecurityLevel(v *WafRuleConfigSecurityLevel) *WafRuleConfig
37 GetSecurityLevel() *WafRuleConfigSecurityLevel
38 SetSigchl(v []*string) *WafRuleConfig
39 GetSigchl() []*string
40 SetStatus(v string) *WafRuleConfig
41 GetStatus() *string
42 SetTimer(v *WafTimer) *WafRuleConfig
43 GetTimer() *WafTimer
44 SetType(v string) *WafRuleConfig
45 GetType() *string
46 SetValue(v string) *WafRuleConfig
47 GetValue() *string
48 }
49
50 type WafRuleConfig struct {
51 Action *string `json:"Action,omitempty" xml:"Action,omitempty"`
52 Actions *WafRuleConfigActions `json:"Actions,omitempty" xml:"Actions,omitempty" type:"Struct"`
53 AppPackage *WafRuleConfigAppPackage `json:"AppPackage,omitempty" xml:"AppPackage,omitempty" type:"Struct"`
54 AppSdk *WafRuleConfigAppSdk `json:"AppSdk,omitempty" xml:"AppSdk,omitempty" type:"Struct"`
55 Expression *string `json:"Expression,omitempty" xml:"Expression,omitempty"`
56 Id *int64 `json:"Id,omitempty" xml:"Id,omitempty"`
57 ManagedGroupId *int64 `json:"ManagedGroupId,omitempty" xml:"ManagedGroupId,omitempty"`
58 ManagedList *string `json:"ManagedList,omitempty" xml:"ManagedList,omitempty"`
59 ManagedRulesets []*WafRuleConfigManagedRulesets `json:"ManagedRulesets,omitempty" xml:"ManagedRulesets,omitempty" type:"Repeated"`
60 Name *string `json:"Name,omitempty" xml:"Name,omitempty"`
61 Notes *string `json:"Notes,omitempty" xml:"Notes,omitempty"`
62 RateLimit *WafRuleConfigRateLimit `json:"RateLimit,omitempty" xml:"RateLimit,omitempty" type:"Struct"`
63 SecurityLevel *WafRuleConfigSecurityLevel `json:"SecurityLevel,omitempty" xml:"SecurityLevel,omitempty" type:"Struct"`
64 Sigchl []*string `json:"Sigchl,omitempty" xml:"Sigchl,omitempty" type:"Repeated"`
65 Status *string `json:"Status,omitempty" xml:"Status,omitempty"`
66 Timer *WafTimer `json:"Timer,omitempty" xml:"Timer,omitempty"`
67 Type *string `json:"Type,omitempty" xml:"Type,omitempty"`
68 Value *string `json:"Value,omitempty" xml:"Value,omitempty"`
69 }
70
71 func (s WafRuleConfig) String() string {
72 return dara.Prettify(s)
73 }
74
75 func (s WafRuleConfig) GoString() string {
76 return s.String()
77 }
78
79 func (s *WafRuleConfig) GetAction() *string {
80 return s.Action
81 }
82
83 func (s *WafRuleConfig) GetActions() *WafRuleConfigActions {
84 return s.Actions
85 }
86
87 func (s *WafRuleConfig) GetAppPackage() *WafRuleConfigAppPackage {
88 return s.AppPackage
89 }
90
91 func (s *WafRuleConfig) GetAppSdk() *WafRuleConfigAppSdk {
92 return s.AppSdk
93 }
94
95 func (s *WafRuleConfig) GetExpression() *string {
96 return s.Expression
97 }
98
99 func (s *WafRuleConfig) GetId() *int64 {
100 return s.Id
101 }
102
103 func (s *WafRuleConfig) GetManagedGroupId() *int64 {
104 return s.ManagedGroupId
105 }
106
107 func (s *WafRuleConfig) GetManagedList() *string {
108 return s.ManagedList
109 }
110
111 func (s *WafRuleConfig) GetManagedRulesets() []*WafRuleConfigManagedRulesets {
112 return s.ManagedRulesets
113 }
114
115 func (s *WafRuleConfig) GetName() *string {
116 return s.Name
117 }
118
119 func (s *WafRuleConfig) GetNotes() *string {
120 return s.Notes
121 }
122
123 func (s *WafRuleConfig) GetRateLimit() *WafRuleConfigRateLimit {
124 return s.RateLimit
125 }
126
127 func (s *WafRuleConfig) GetSecurityLevel() *WafRuleConfigSecurityLevel {
128 return s.SecurityLevel
129 }
130
131 func (s *WafRuleConfig) GetSigchl() []*string {
132 return s.Sigchl
133 }
134
135 func (s *WafRuleConfig) GetStatus() *string {
136 return s.Status
137 }
138
139 func (s *WafRuleConfig) GetTimer() *WafTimer {
140 return s.Timer
141 }
142
143 func (s *WafRuleConfig) GetType() *string {
144 return s.Type
145 }
146
147 func (s *WafRuleConfig) GetValue() *string {
148 return s.Value
149 }
150
151 func (s *WafRuleConfig) SetAction(v string) *WafRuleConfig {
152 s.Action = &v
153 return s
154 }
155
156 func (s *WafRuleConfig) SetActions(v *WafRuleConfigActions) *WafRuleConfig {
157 s.Actions = v
158 return s
159 }
160
161 func (s *WafRuleConfig) SetAppPackage(v *WafRuleConfigAppPackage) *WafRuleConfig {
162 s.AppPackage = v
163 return s
164 }
165
166 func (s *WafRuleConfig) SetAppSdk(v *WafRuleConfigAppSdk) *WafRuleConfig {
167 s.AppSdk = v
168 return s
169 }
170
171 func (s *WafRuleConfig) SetExpression(v string) *WafRuleConfig {
172 s.Expression = &v
173 return s
174 }
175
176 func (s *WafRuleConfig) SetId(v int64) *WafRuleConfig {
177 s.Id = &v
178 return s
179 }
180
181 func (s *WafRuleConfig) SetManagedGroupId(v int64) *WafRuleConfig {
182 s.ManagedGroupId = &v
183 return s
184 }
185
186 func (s *WafRuleConfig) SetManagedList(v string) *WafRuleConfig {
187 s.ManagedList = &v
188 return s
189 }
190
191 func (s *WafRuleConfig) SetManagedRulesets(v []*WafRuleConfigManagedRulesets) *WafRuleConfig {
192 s.ManagedRulesets = v
193 return s
194 }
195
196 func (s *WafRuleConfig) SetName(v string) *WafRuleConfig {
197 s.Name = &v
198 return s
199 }
200
201 func (s *WafRuleConfig) SetNotes(v string) *WafRuleConfig {
202 s.Notes = &v
203 return s
204 }
205
206 func (s *WafRuleConfig) SetRateLimit(v *WafRuleConfigRateLimit) *WafRuleConfig {
207 s.RateLimit = v
208 return s
209 }
210
211 func (s *WafRuleConfig) SetSecurityLevel(v *WafRuleConfigSecurityLevel) *WafRuleConfig {
212 s.SecurityLevel = v
213 return s
214 }
215
216 func (s *WafRuleConfig) SetSigchl(v []*string) *WafRuleConfig {
217 s.Sigchl = v
218 return s
219 }
220
221 func (s *WafRuleConfig) SetStatus(v string) *WafRuleConfig {
222 s.Status = &v
223 return s
224 }
225
226 func (s *WafRuleConfig) SetTimer(v *WafTimer) *WafRuleConfig {
227 s.Timer = v
228 return s
229 }
230
231 func (s *WafRuleConfig) SetType(v string) *WafRuleConfig {
232 s.Type = &v
233 return s
234 }
235
236 func (s *WafRuleConfig) SetValue(v string) *WafRuleConfig {
237 s.Value = &v
238 return s
239 }
240
241 func (s *WafRuleConfig) Validate() error {
242 if s.Actions != nil {
243 if err := s.Actions.Validate(); err != nil {
244 return err
245 }
246 }
247 if s.AppPackage != nil {
248 if err := s.AppPackage.Validate(); err != nil {
249 return err
250 }
251 }
252 if s.AppSdk != nil {
253 if err := s.AppSdk.Validate(); err != nil {
254 return err
255 }
256 }
257 if s.ManagedRulesets != nil {
258 for _, item := range s.ManagedRulesets {
259 if item != nil {
260 if err := item.Validate(); err != nil {
261 return err
262 }
263 }
264 }
265 }
266 if s.RateLimit != nil {
267 if err := s.RateLimit.Validate(); err != nil {
268 return err
269 }
270 }
271 if s.SecurityLevel != nil {
272 if err := s.SecurityLevel.Validate(); err != nil {
273 return err
274 }
275 }
276 if s.Timer != nil {
277 if err := s.Timer.Validate(); err != nil {
278 return err
279 }
280 }
281 return nil
282 }
283
284 type WafRuleConfigActions struct {
285 Bypass *WafRuleConfigActionsBypass `json:"Bypass,omitempty" xml:"Bypass,omitempty" type:"Struct"`
286 Response *WafRuleConfigActionsResponse `json:"Response,omitempty" xml:"Response,omitempty" type:"Struct"`
287 }
288
289 func (s WafRuleConfigActions) String() string {
290 return dara.Prettify(s)
291 }
292
293 func (s WafRuleConfigActions) GoString() string {
294 return s.String()
295 }
296
297 func (s *WafRuleConfigActions) GetBypass() *WafRuleConfigActionsBypass {
298 return s.Bypass
299 }
300
301 func (s *WafRuleConfigActions) GetResponse() *WafRuleConfigActionsResponse {
302 return s.Response
303 }
304
305 func (s *WafRuleConfigActions) SetBypass(v *WafRuleConfigActionsBypass) *WafRuleConfigActions {
306 s.Bypass = v
307 return s
308 }
309
310 func (s *WafRuleConfigActions) SetResponse(v *WafRuleConfigActionsResponse) *WafRuleConfigActions {
311 s.Response = v
312 return s
313 }
314
315 func (s *WafRuleConfigActions) Validate() error {
316 if s.Bypass != nil {
317 if err := s.Bypass.Validate(); err != nil {
318 return err
319 }
320 }
321 if s.Response != nil {
322 if err := s.Response.Validate(); err != nil {
323 return err
324 }
325 }
326 return nil
327 }
328
329 type WafRuleConfigActionsBypass struct {
330 CustomRules []*int64 `json:"CustomRules,omitempty" xml:"CustomRules,omitempty" type:"Repeated"`
331 RegularRules []*int64 `json:"RegularRules,omitempty" xml:"RegularRules,omitempty" type:"Repeated"`
332 RegularTypes []*string `json:"RegularTypes,omitempty" xml:"RegularTypes,omitempty" type:"Repeated"`
333 Skip *string `json:"Skip,omitempty" xml:"Skip,omitempty"`
334 Tags []*string `json:"Tags,omitempty" xml:"Tags,omitempty" type:"Repeated"`
335 }
336
337 func (s WafRuleConfigActionsBypass) String() string {
338 return dara.Prettify(s)
339 }
340
341 func (s WafRuleConfigActionsBypass) GoString() string {
342 return s.String()
343 }
344
345 func (s *WafRuleConfigActionsBypass) GetCustomRules() []*int64 {
346 return s.CustomRules
347 }
348
349 func (s *WafRuleConfigActionsBypass) GetRegularRules() []*int64 {
350 return s.RegularRules
351 }
352
353 func (s *WafRuleConfigActionsBypass) GetRegularTypes() []*string {
354 return s.RegularTypes
355 }
356
357 func (s *WafRuleConfigActionsBypass) GetSkip() *string {
358 return s.Skip
359 }
360
361 func (s *WafRuleConfigActionsBypass) GetTags() []*string {
362 return s.Tags
363 }
364
365 func (s *WafRuleConfigActionsBypass) SetCustomRules(v []*int64) *WafRuleConfigActionsBypass {
366 s.CustomRules = v
367 return s
368 }
369
370 func (s *WafRuleConfigActionsBypass) SetRegularRules(v []*int64) *WafRuleConfigActionsBypass {
371 s.RegularRules = v
372 return s
373 }
374
375 func (s *WafRuleConfigActionsBypass) SetRegularTypes(v []*string) *WafRuleConfigActionsBypass {
376 s.RegularTypes = v
377 return s
378 }
379
380 func (s *WafRuleConfigActionsBypass) SetSkip(v string) *WafRuleConfigActionsBypass {
381 s.Skip = &v
382 return s
383 }
384
385 func (s *WafRuleConfigActionsBypass) SetTags(v []*string) *WafRuleConfigActionsBypass {
386 s.Tags = v
387 return s
388 }
389
390 func (s *WafRuleConfigActionsBypass) Validate() error {
391 return dara.Validate(s)
392 }
393
394 type WafRuleConfigActionsResponse struct {
395 Code *int32 `json:"Code,omitempty" xml:"Code,omitempty"`
396 Id *int64 `json:"Id,omitempty" xml:"Id,omitempty"`
397 }
398
399 func (s WafRuleConfigActionsResponse) String() string {
400 return dara.Prettify(s)
401 }
402
403 func (s WafRuleConfigActionsResponse) GoString() string {
404 return s.String()
405 }
406
407 func (s *WafRuleConfigActionsResponse) GetCode() *int32 {
408 return s.Code
409 }
410
411 func (s *WafRuleConfigActionsResponse) GetId() *int64 {
412 return s.Id
413 }
414
415 func (s *WafRuleConfigActionsResponse) SetCode(v int32) *WafRuleConfigActionsResponse {
416 s.Code = &v
417 return s
418 }
419
420 func (s *WafRuleConfigActionsResponse) SetId(v int64) *WafRuleConfigActionsResponse {
421 s.Id = &v
422 return s
423 }
424
425 func (s *WafRuleConfigActionsResponse) Validate() error {
426 return dara.Validate(s)
427 }
428
429 type WafRuleConfigAppPackage struct {
430 PackageSigns []*WafRuleConfigAppPackagePackageSigns `json:"PackageSigns,omitempty" xml:"PackageSigns,omitempty" type:"Repeated"`
431 }
432
433 func (s WafRuleConfigAppPackage) String() string {
434 return dara.Prettify(s)
435 }
436
437 func (s WafRuleConfigAppPackage) GoString() string {
438 return s.String()
439 }
440
441 func (s *WafRuleConfigAppPackage) GetPackageSigns() []*WafRuleConfigAppPackagePackageSigns {
442 return s.PackageSigns
443 }
444
445 func (s *WafRuleConfigAppPackage) SetPackageSigns(v []*WafRuleConfigAppPackagePackageSigns) *WafRuleConfigAppPackage {
446 s.PackageSigns = v
447 return s
448 }
449
450 func (s *WafRuleConfigAppPackage) Validate() error {
451 if s.PackageSigns != nil {
452 for _, item := range s.PackageSigns {
453 if item != nil {
454 if err := item.Validate(); err != nil {
455 return err
456 }
457 }
458 }
459 }
460 return nil
461 }
462
463 type WafRuleConfigAppPackagePackageSigns struct {
464 Name *string `json:"Name,omitempty" xml:"Name,omitempty"`
465 Sign *string `json:"Sign,omitempty" xml:"Sign,omitempty"`
466 }
467
468 func (s WafRuleConfigAppPackagePackageSigns) String() string {
469 return dara.Prettify(s)
470 }
471
472 func (s WafRuleConfigAppPackagePackageSigns) GoString() string {
473 return s.String()
474 }
475
476 func (s *WafRuleConfigAppPackagePackageSigns) GetName() *string {
477 return s.Name
478 }
479
480 func (s *WafRuleConfigAppPackagePackageSigns) GetSign() *string {
481 return s.Sign
482 }
483
484 func (s *WafRuleConfigAppPackagePackageSigns) SetName(v string) *WafRuleConfigAppPackagePackageSigns {
485 s.Name = &v
486 return s
487 }
488
489 func (s *WafRuleConfigAppPackagePackageSigns) SetSign(v string) *WafRuleConfigAppPackagePackageSigns {
490 s.Sign = &v
491 return s
492 }
493
494 func (s *WafRuleConfigAppPackagePackageSigns) Validate() error {
495 return dara.Validate(s)
496 }
497
498 type WafRuleConfigAppSdk struct {
499 CustomSign *WafRuleConfigAppSdkCustomSign `json:"CustomSign,omitempty" xml:"CustomSign,omitempty" type:"Struct"`
500 CustomSignStatus *string `json:"CustomSignStatus,omitempty" xml:"CustomSignStatus,omitempty"`
501 FeatureAbnormal []*string `json:"FeatureAbnormal,omitempty" xml:"FeatureAbnormal,omitempty" type:"Repeated"`
502 }
503
504 func (s WafRuleConfigAppSdk) String() string {
505 return dara.Prettify(s)
506 }
507
508 func (s WafRuleConfigAppSdk) GoString() string {
509 return s.String()
510 }
511
512 func (s *WafRuleConfigAppSdk) GetCustomSign() *WafRuleConfigAppSdkCustomSign {
513 return s.CustomSign
514 }
515
516 func (s *WafRuleConfigAppSdk) GetCustomSignStatus() *string {
517 return s.CustomSignStatus
518 }
519
520 func (s *WafRuleConfigAppSdk) GetFeatureAbnormal() []*string {
521 return s.FeatureAbnormal
522 }
523
524 func (s *WafRuleConfigAppSdk) SetCustomSign(v *WafRuleConfigAppSdkCustomSign) *WafRuleConfigAppSdk {
525 s.CustomSign = v
526 return s
527 }
528
529 func (s *WafRuleConfigAppSdk) SetCustomSignStatus(v string) *WafRuleConfigAppSdk {
530 s.CustomSignStatus = &v
531 return s
532 }
533
534 func (s *WafRuleConfigAppSdk) SetFeatureAbnormal(v []*string) *WafRuleConfigAppSdk {
535 s.FeatureAbnormal = v
536 return s
537 }
538
539 func (s *WafRuleConfigAppSdk) Validate() error {
540 if s.CustomSign != nil {
541 if err := s.CustomSign.Validate(); err != nil {
542 return err
543 }
544 }
545 return nil
546 }
547
548 type WafRuleConfigAppSdkCustomSign struct {
549 Key *string `json:"Key,omitempty" xml:"Key,omitempty"`
550 Value *string `json:"Value,omitempty" xml:"Value,omitempty"`
551 }
552
553 func (s WafRuleConfigAppSdkCustomSign) String() string {
554 return dara.Prettify(s)
555 }
556
557 func (s WafRuleConfigAppSdkCustomSign) GoString() string {
558 return s.String()
559 }
560
561 func (s *WafRuleConfigAppSdkCustomSign) GetKey() *string {
562 return s.Key
563 }
564
565 func (s *WafRuleConfigAppSdkCustomSign) GetValue() *string {
566 return s.Value
567 }
568
569 func (s *WafRuleConfigAppSdkCustomSign) SetKey(v string) *WafRuleConfigAppSdkCustomSign {
570 s.Key = &v
571 return s
572 }
573
574 func (s *WafRuleConfigAppSdkCustomSign) SetValue(v string) *WafRuleConfigAppSdkCustomSign {
575 s.Value = &v
576 return s
577 }
578
579 func (s *WafRuleConfigAppSdkCustomSign) Validate() error {
580 return dara.Validate(s)
581 }
582
583 type WafRuleConfigManagedRulesets struct {
584 Action *string `json:"Action,omitempty" xml:"Action,omitempty"`
585 AttackType *int32 `json:"AttackType,omitempty" xml:"AttackType,omitempty"`
586 ManagedRules []*WafRuleConfigManagedRulesetsManagedRules `json:"ManagedRules,omitempty" xml:"ManagedRules,omitempty" type:"Repeated"`
587 NumberEnabled *int32 `json:"NumberEnabled,omitempty" xml:"NumberEnabled,omitempty"`
588 NumberTotal *int32 `json:"NumberTotal,omitempty" xml:"NumberTotal,omitempty"`
589 ProtectionLevel *int32 `json:"ProtectionLevel,omitempty" xml:"ProtectionLevel,omitempty"`
590 }
591
592 func (s WafRuleConfigManagedRulesets) String() string {
593 return dara.Prettify(s)
594 }
595
596 func (s WafRuleConfigManagedRulesets) GoString() string {
597 return s.String()
598 }
599
600 func (s *WafRuleConfigManagedRulesets) GetAction() *string {
601 return s.Action
602 }
603
604 func (s *WafRuleConfigManagedRulesets) GetAttackType() *int32 {
605 return s.AttackType
606 }
607
608 func (s *WafRuleConfigManagedRulesets) GetManagedRules() []*WafRuleConfigManagedRulesetsManagedRules {
609 return s.ManagedRules
610 }
611
612 func (s *WafRuleConfigManagedRulesets) GetNumberEnabled() *int32 {
613 return s.NumberEnabled
614 }
615
616 func (s *WafRuleConfigManagedRulesets) GetNumberTotal() *int32 {
617 return s.NumberTotal
618 }
619
620 func (s *WafRuleConfigManagedRulesets) GetProtectionLevel() *int32 {
621 return s.ProtectionLevel
622 }
623
624 func (s *WafRuleConfigManagedRulesets) SetAction(v string) *WafRuleConfigManagedRulesets {
625 s.Action = &v
626 return s
627 }
628
629 func (s *WafRuleConfigManagedRulesets) SetAttackType(v int32) *WafRuleConfigManagedRulesets {
630 s.AttackType = &v
631 return s
632 }
633
634 func (s *WafRuleConfigManagedRulesets) SetManagedRules(v []*WafRuleConfigManagedRulesetsManagedRules) *WafRuleConfigManagedRulesets {
635 s.ManagedRules = v
636 return s
637 }
638
639 func (s *WafRuleConfigManagedRulesets) SetNumberEnabled(v int32) *WafRuleConfigManagedRulesets {
640 s.NumberEnabled = &v
641 return s
642 }
643
644 func (s *WafRuleConfigManagedRulesets) SetNumberTotal(v int32) *WafRuleConfigManagedRulesets {
645 s.NumberTotal = &v
646 return s
647 }
648
649 func (s *WafRuleConfigManagedRulesets) SetProtectionLevel(v int32) *WafRuleConfigManagedRulesets {
650 s.ProtectionLevel = &v
651 return s
652 }
653
654 func (s *WafRuleConfigManagedRulesets) Validate() error {
655 if s.ManagedRules != nil {
656 for _, item := range s.ManagedRules {
657 if item != nil {
658 if err := item.Validate(); err != nil {
659 return err
660 }
661 }
662 }
663 }
664 return nil
665 }
666
667 type WafRuleConfigManagedRulesetsManagedRules struct {
668 Action *string `json:"Action,omitempty" xml:"Action,omitempty"`
669 Id *int64 `json:"Id,omitempty" xml:"Id,omitempty"`
670 Status *string `json:"Status,omitempty" xml:"Status,omitempty"`
671 }
672
673 func (s WafRuleConfigManagedRulesetsManagedRules) String() string {
674 return dara.Prettify(s)
675 }
676
677 func (s WafRuleConfigManagedRulesetsManagedRules) GoString() string {
678 return s.String()
679 }
680
681 func (s *WafRuleConfigManagedRulesetsManagedRules) GetAction() *string {
682 return s.Action
683 }
684
685 func (s *WafRuleConfigManagedRulesetsManagedRules) GetId() *int64 {
686 return s.Id
687 }
688
689 func (s *WafRuleConfigManagedRulesetsManagedRules) GetStatus() *string {
690 return s.Status
691 }
692
693 func (s *WafRuleConfigManagedRulesetsManagedRules) SetAction(v string) *WafRuleConfigManagedRulesetsManagedRules {
694 s.Action = &v
695 return s
696 }
697
698 func (s *WafRuleConfigManagedRulesetsManagedRules) SetId(v int64) *WafRuleConfigManagedRulesetsManagedRules {
699 s.Id = &v
700 return s
701 }
702
703 func (s *WafRuleConfigManagedRulesetsManagedRules) SetStatus(v string) *WafRuleConfigManagedRulesetsManagedRules {
704 s.Status = &v
705 return s
706 }
707
708 func (s *WafRuleConfigManagedRulesetsManagedRules) Validate() error {
709 return dara.Validate(s)
710 }
711
712 type WafRuleConfigRateLimit struct {
713 Characteristics *WafRatelimitCharacteristics `json:"Characteristics,omitempty" xml:"Characteristics,omitempty"`
714 Interval *int32 `json:"Interval,omitempty" xml:"Interval,omitempty"`
715 OnHit *bool `json:"OnHit,omitempty" xml:"OnHit,omitempty"`
716 TTL *int32 `json:"TTL,omitempty" xml:"TTL,omitempty"`
717 Threshold *WafRuleConfigRateLimitThreshold `json:"Threshold,omitempty" xml:"Threshold,omitempty" type:"Struct"`
718 }
719
720 func (s WafRuleConfigRateLimit) String() string {
721 return dara.Prettify(s)
722 }
723
724 func (s WafRuleConfigRateLimit) GoString() string {
725 return s.String()
726 }
727
728 func (s *WafRuleConfigRateLimit) GetCharacteristics() *WafRatelimitCharacteristics {
729 return s.Characteristics
730 }
731
732 func (s *WafRuleConfigRateLimit) GetInterval() *int32 {
733 return s.Interval
734 }
735
736 func (s *WafRuleConfigRateLimit) GetOnHit() *bool {
737 return s.OnHit
738 }
739
740 func (s *WafRuleConfigRateLimit) GetTTL() *int32 {
741 return s.TTL
742 }
743
744 func (s *WafRuleConfigRateLimit) GetThreshold() *WafRuleConfigRateLimitThreshold {
745 return s.Threshold
746 }
747
748 func (s *WafRuleConfigRateLimit) SetCharacteristics(v *WafRatelimitCharacteristics) *WafRuleConfigRateLimit {
749 s.Characteristics = v
750 return s
751 }
752
753 func (s *WafRuleConfigRateLimit) SetInterval(v int32) *WafRuleConfigRateLimit {
754 s.Interval = &v
755 return s
756 }
757
758 func (s *WafRuleConfigRateLimit) SetOnHit(v bool) *WafRuleConfigRateLimit {
759 s.OnHit = &v
760 return s
761 }
762
763 func (s *WafRuleConfigRateLimit) SetTTL(v int32) *WafRuleConfigRateLimit {
764 s.TTL = &v
765 return s
766 }
767
768 func (s *WafRuleConfigRateLimit) SetThreshold(v *WafRuleConfigRateLimitThreshold) *WafRuleConfigRateLimit {
769 s.Threshold = v
770 return s
771 }
772
773 func (s *WafRuleConfigRateLimit) Validate() error {
774 if s.Characteristics != nil {
775 if err := s.Characteristics.Validate(); err != nil {
776 return err
777 }
778 }
779 if s.Threshold != nil {
780 if err := s.Threshold.Validate(); err != nil {
781 return err
782 }
783 }
784 return nil
785 }
786
787 type WafRuleConfigRateLimitThreshold struct {
788 DistinctManagedRules *int32 `json:"DistinctManagedRules,omitempty" xml:"DistinctManagedRules,omitempty"`
789 ManagedRulesBlocked *int32 `json:"ManagedRulesBlocked,omitempty" xml:"ManagedRulesBlocked,omitempty"`
790 Request *int32 `json:"Request,omitempty" xml:"Request,omitempty"`
791 ResponseStatus *WafRuleConfigRateLimitThresholdResponseStatus `json:"ResponseStatus,omitempty" xml:"ResponseStatus,omitempty" type:"Struct"`
792 Traffic *string `json:"Traffic,omitempty" xml:"Traffic,omitempty"`
793 }
794
795 func (s WafRuleConfigRateLimitThreshold) String() string {
796 return dara.Prettify(s)
797 }
798
799 func (s WafRuleConfigRateLimitThreshold) GoString() string {
800 return s.String()
801 }
802
803 func (s *WafRuleConfigRateLimitThreshold) GetDistinctManagedRules() *int32 {
804 return s.DistinctManagedRules
805 }
806
807 func (s *WafRuleConfigRateLimitThreshold) GetManagedRulesBlocked() *int32 {
808 return s.ManagedRulesBlocked
809 }
810
811 func (s *WafRuleConfigRateLimitThreshold) GetRequest() *int32 {
812 return s.Request
813 }
814
815 func (s *WafRuleConfigRateLimitThreshold) GetResponseStatus() *WafRuleConfigRateLimitThresholdResponseStatus {
816 return s.ResponseStatus
817 }
818
819 func (s *WafRuleConfigRateLimitThreshold) GetTraffic() *string {
820 return s.Traffic
821 }
822
823 func (s *WafRuleConfigRateLimitThreshold) SetDistinctManagedRules(v int32) *WafRuleConfigRateLimitThreshold {
824 s.DistinctManagedRules = &v
825 return s
826 }
827
828 func (s *WafRuleConfigRateLimitThreshold) SetManagedRulesBlocked(v int32) *WafRuleConfigRateLimitThreshold {
829 s.ManagedRulesBlocked = &v
830 return s
831 }
832
833 func (s *WafRuleConfigRateLimitThreshold) SetRequest(v int32) *WafRuleConfigRateLimitThreshold {
834 s.Request = &v
835 return s
836 }
837
838 func (s *WafRuleConfigRateLimitThreshold) SetResponseStatus(v *WafRuleConfigRateLimitThresholdResponseStatus) *WafRuleConfigRateLimitThreshold {
839 s.ResponseStatus = v
840 return s
841 }
842
843 func (s *WafRuleConfigRateLimitThreshold) SetTraffic(v string) *WafRuleConfigRateLimitThreshold {
844 s.Traffic = &v
845 return s
846 }
847
848 func (s *WafRuleConfigRateLimitThreshold) Validate() error {
849 if s.ResponseStatus != nil {
850 if err := s.ResponseStatus.Validate(); err != nil {
851 return err
852 }
853 }
854 return nil
855 }
856
857 type WafRuleConfigRateLimitThresholdResponseStatus struct {
858 Code *int32 `json:"Code,omitempty" xml:"Code,omitempty"`
859 Count *int32 `json:"Count,omitempty" xml:"Count,omitempty"`
860 Ratio *int32 `json:"Ratio,omitempty" xml:"Ratio,omitempty"`
861 }
862
863 func (s WafRuleConfigRateLimitThresholdResponseStatus) String() string {
864 return dara.Prettify(s)
865 }
866
867 func (s WafRuleConfigRateLimitThresholdResponseStatus) GoString() string {
868 return s.String()
869 }
870
871 func (s *WafRuleConfigRateLimitThresholdResponseStatus) GetCode() *int32 {
872 return s.Code
873 }
874
875 func (s *WafRuleConfigRateLimitThresholdResponseStatus) GetCount() *int32 {
876 return s.Count
877 }
878
879 func (s *WafRuleConfigRateLimitThresholdResponseStatus) GetRatio() *int32 {
880 return s.Ratio
881 }
882
883 func (s *WafRuleConfigRateLimitThresholdResponseStatus) SetCode(v int32) *WafRuleConfigRateLimitThresholdResponseStatus {
884 s.Code = &v
885 return s
886 }
887
888 func (s *WafRuleConfigRateLimitThresholdResponseStatus) SetCount(v int32) *WafRuleConfigRateLimitThresholdResponseStatus {
889 s.Count = &v
890 return s
891 }
892
893 func (s *WafRuleConfigRateLimitThresholdResponseStatus) SetRatio(v int32) *WafRuleConfigRateLimitThresholdResponseStatus {
894 s.Ratio = &v
895 return s
896 }
897
898 func (s *WafRuleConfigRateLimitThresholdResponseStatus) Validate() error {
899 return dara.Validate(s)
900 }
901
902 type WafRuleConfigSecurityLevel struct {
903 Value *string `json:"Value,omitempty" xml:"Value,omitempty"`
904 }
905
906 func (s WafRuleConfigSecurityLevel) String() string {
907 return dara.Prettify(s)
908 }
909
910 func (s WafRuleConfigSecurityLevel) GoString() string {
911 return s.String()
912 }
913
914 func (s *WafRuleConfigSecurityLevel) GetValue() *string {
915 return s.Value
916 }
917
918 func (s *WafRuleConfigSecurityLevel) SetValue(v string) *WafRuleConfigSecurityLevel {
919 s.Value = &v
920 return s
921 }
922
923 func (s *WafRuleConfigSecurityLevel) Validate() error {
924 return dara.Validate(s)
925 }
926