waf_rule_match_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 iWafRuleMatch interface {
9 dara.Model
10 String() string
11 GoString() string
12 SetConvertToLower(v bool) *WafRuleMatch
13 GetConvertToLower() *bool
14 SetCriteria(v []*WafRuleMatch) *WafRuleMatch
15 GetCriteria() []*WafRuleMatch
16 SetLogic(v string) *WafRuleMatch
17 GetLogic() *string
18 SetMatchOperator(v string) *WafRuleMatch
19 GetMatchOperator() *string
20 SetMatchType(v string) *WafRuleMatch
21 GetMatchType() *string
22 SetMatchValue(v interface{}) *WafRuleMatch
23 GetMatchValue() interface{}
24 SetNegate(v bool) *WafRuleMatch
25 GetNegate() *bool
26 }
27
28 type WafRuleMatch struct {
29 ConvertToLower *bool `json:"ConvertToLower,omitempty" xml:"ConvertToLower,omitempty"`
30 Criteria []*WafRuleMatch `json:"Criteria,omitempty" xml:"Criteria,omitempty" type:"Repeated"`
31 Logic *string `json:"Logic,omitempty" xml:"Logic,omitempty"`
32 MatchOperator *string `json:"MatchOperator,omitempty" xml:"MatchOperator,omitempty"`
33 MatchType *string `json:"MatchType,omitempty" xml:"MatchType,omitempty"`
34 MatchValue interface{} `json:"MatchValue,omitempty" xml:"MatchValue,omitempty"`
35 Negate *bool `json:"Negate,omitempty" xml:"Negate,omitempty"`
36 }
37
38 func (s WafRuleMatch) String() string {
39 return dara.Prettify(s)
40 }
41
42 func (s WafRuleMatch) GoString() string {
43 return s.String()
44 }
45
46 func (s *WafRuleMatch) GetConvertToLower() *bool {
47 return s.ConvertToLower
48 }
49
50 func (s *WafRuleMatch) GetCriteria() []*WafRuleMatch {
51 return s.Criteria
52 }
53
54 func (s *WafRuleMatch) GetLogic() *string {
55 return s.Logic
56 }
57
58 func (s *WafRuleMatch) GetMatchOperator() *string {
59 return s.MatchOperator
60 }
61
62 func (s *WafRuleMatch) GetMatchType() *string {
63 return s.MatchType
64 }
65
66 func (s *WafRuleMatch) GetMatchValue() interface{} {
67 return s.MatchValue
68 }
69
70 func (s *WafRuleMatch) GetNegate() *bool {
71 return s.Negate
72 }
73
74 func (s *WafRuleMatch) SetConvertToLower(v bool) *WafRuleMatch {
75 s.ConvertToLower = &v
76 return s
77 }
78
79 func (s *WafRuleMatch) SetCriteria(v []*WafRuleMatch) *WafRuleMatch {
80 s.Criteria = v
81 return s
82 }
83
84 func (s *WafRuleMatch) SetLogic(v string) *WafRuleMatch {
85 s.Logic = &v
86 return s
87 }
88
89 func (s *WafRuleMatch) SetMatchOperator(v string) *WafRuleMatch {
90 s.MatchOperator = &v
91 return s
92 }
93
94 func (s *WafRuleMatch) SetMatchType(v string) *WafRuleMatch {
95 s.MatchType = &v
96 return s
97 }
98
99 func (s *WafRuleMatch) SetMatchValue(v interface{}) *WafRuleMatch {
100 s.MatchValue = v
101 return s
102 }
103
104 func (s *WafRuleMatch) SetNegate(v bool) *WafRuleMatch {
105 s.Negate = &v
106 return s
107 }
108
109 func (s *WafRuleMatch) Validate() error {
110 if s.Criteria != nil {
111 for _, item := range s.Criteria {
112 if item != nil {
113 if err := item.Validate(); err != nil {
114 return err
115 }
116 }
117 }
118 }
119 return nil
120 }
121