waf_ratelimit_characteristics_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 iWafRatelimitCharacteristics interface {
   9  	dara.Model
  10  	String() string
  11  	GoString() string
  12  	SetCriteria(v []*WafRatelimitCharacteristicsCriteria) *WafRatelimitCharacteristics
  13  	GetCriteria() []*WafRatelimitCharacteristicsCriteria
  14  	SetLogic(v string) *WafRatelimitCharacteristics
  15  	GetLogic() *string
  16  	SetMatchType(v string) *WafRatelimitCharacteristics
  17  	GetMatchType() *string
  18  }
  19  
  20  type WafRatelimitCharacteristics struct {
  21  	Criteria  []*WafRatelimitCharacteristicsCriteria `json:"Criteria,omitempty" xml:"Criteria,omitempty" type:"Repeated"`
  22  	Logic     *string                                `json:"Logic,omitempty" xml:"Logic,omitempty"`
  23  	MatchType *string                                `json:"MatchType,omitempty" xml:"MatchType,omitempty"`
  24  }
  25  
  26  func (s WafRatelimitCharacteristics) String() string {
  27  	return dara.Prettify(s)
  28  }
  29  
  30  func (s WafRatelimitCharacteristics) GoString() string {
  31  	return s.String()
  32  }
  33  
  34  func (s *WafRatelimitCharacteristics) GetCriteria() []*WafRatelimitCharacteristicsCriteria {
  35  	return s.Criteria
  36  }
  37  
  38  func (s *WafRatelimitCharacteristics) GetLogic() *string {
  39  	return s.Logic
  40  }
  41  
  42  func (s *WafRatelimitCharacteristics) GetMatchType() *string {
  43  	return s.MatchType
  44  }
  45  
  46  func (s *WafRatelimitCharacteristics) SetCriteria(v []*WafRatelimitCharacteristicsCriteria) *WafRatelimitCharacteristics {
  47  	s.Criteria = v
  48  	return s
  49  }
  50  
  51  func (s *WafRatelimitCharacteristics) SetLogic(v string) *WafRatelimitCharacteristics {
  52  	s.Logic = &v
  53  	return s
  54  }
  55  
  56  func (s *WafRatelimitCharacteristics) SetMatchType(v string) *WafRatelimitCharacteristics {
  57  	s.MatchType = &v
  58  	return s
  59  }
  60  
  61  func (s *WafRatelimitCharacteristics) Validate() error {
  62  	if s.Criteria != nil {
  63  		for _, item := range s.Criteria {
  64  			if item != nil {
  65  				if err := item.Validate(); err != nil {
  66  					return err
  67  				}
  68  			}
  69  		}
  70  	}
  71  	return nil
  72  }
  73  
  74  type WafRatelimitCharacteristicsCriteria struct {
  75  	Criteria  []*WafRatelimitCharacteristicsCriteriaCriteria `json:"Criteria,omitempty" xml:"Criteria,omitempty" type:"Repeated"`
  76  	Logic     *string                                        `json:"Logic,omitempty" xml:"Logic,omitempty"`
  77  	MatchType *string                                        `json:"MatchType,omitempty" xml:"MatchType,omitempty"`
  78  }
  79  
  80  func (s WafRatelimitCharacteristicsCriteria) String() string {
  81  	return dara.Prettify(s)
  82  }
  83  
  84  func (s WafRatelimitCharacteristicsCriteria) GoString() string {
  85  	return s.String()
  86  }
  87  
  88  func (s *WafRatelimitCharacteristicsCriteria) GetCriteria() []*WafRatelimitCharacteristicsCriteriaCriteria {
  89  	return s.Criteria
  90  }
  91  
  92  func (s *WafRatelimitCharacteristicsCriteria) GetLogic() *string {
  93  	return s.Logic
  94  }
  95  
  96  func (s *WafRatelimitCharacteristicsCriteria) GetMatchType() *string {
  97  	return s.MatchType
  98  }
  99  
 100  func (s *WafRatelimitCharacteristicsCriteria) SetCriteria(v []*WafRatelimitCharacteristicsCriteriaCriteria) *WafRatelimitCharacteristicsCriteria {
 101  	s.Criteria = v
 102  	return s
 103  }
 104  
 105  func (s *WafRatelimitCharacteristicsCriteria) SetLogic(v string) *WafRatelimitCharacteristicsCriteria {
 106  	s.Logic = &v
 107  	return s
 108  }
 109  
 110  func (s *WafRatelimitCharacteristicsCriteria) SetMatchType(v string) *WafRatelimitCharacteristicsCriteria {
 111  	s.MatchType = &v
 112  	return s
 113  }
 114  
 115  func (s *WafRatelimitCharacteristicsCriteria) Validate() error {
 116  	if s.Criteria != nil {
 117  		for _, item := range s.Criteria {
 118  			if item != nil {
 119  				if err := item.Validate(); err != nil {
 120  					return err
 121  				}
 122  			}
 123  		}
 124  	}
 125  	return nil
 126  }
 127  
 128  type WafRatelimitCharacteristicsCriteriaCriteria struct {
 129  	Criteria  []*WafRatelimitCharacteristicsCriteriaCriteriaCriteria `json:"Criteria,omitempty" xml:"Criteria,omitempty" type:"Repeated"`
 130  	Logic     *string                                                `json:"Logic,omitempty" xml:"Logic,omitempty"`
 131  	MatchType *string                                                `json:"MatchType,omitempty" xml:"MatchType,omitempty"`
 132  }
 133  
 134  func (s WafRatelimitCharacteristicsCriteriaCriteria) String() string {
 135  	return dara.Prettify(s)
 136  }
 137  
 138  func (s WafRatelimitCharacteristicsCriteriaCriteria) GoString() string {
 139  	return s.String()
 140  }
 141  
 142  func (s *WafRatelimitCharacteristicsCriteriaCriteria) GetCriteria() []*WafRatelimitCharacteristicsCriteriaCriteriaCriteria {
 143  	return s.Criteria
 144  }
 145  
 146  func (s *WafRatelimitCharacteristicsCriteriaCriteria) GetLogic() *string {
 147  	return s.Logic
 148  }
 149  
 150  func (s *WafRatelimitCharacteristicsCriteriaCriteria) GetMatchType() *string {
 151  	return s.MatchType
 152  }
 153  
 154  func (s *WafRatelimitCharacteristicsCriteriaCriteria) SetCriteria(v []*WafRatelimitCharacteristicsCriteriaCriteriaCriteria) *WafRatelimitCharacteristicsCriteriaCriteria {
 155  	s.Criteria = v
 156  	return s
 157  }
 158  
 159  func (s *WafRatelimitCharacteristicsCriteriaCriteria) SetLogic(v string) *WafRatelimitCharacteristicsCriteriaCriteria {
 160  	s.Logic = &v
 161  	return s
 162  }
 163  
 164  func (s *WafRatelimitCharacteristicsCriteriaCriteria) SetMatchType(v string) *WafRatelimitCharacteristicsCriteriaCriteria {
 165  	s.MatchType = &v
 166  	return s
 167  }
 168  
 169  func (s *WafRatelimitCharacteristicsCriteriaCriteria) Validate() error {
 170  	if s.Criteria != nil {
 171  		for _, item := range s.Criteria {
 172  			if item != nil {
 173  				if err := item.Validate(); err != nil {
 174  					return err
 175  				}
 176  			}
 177  		}
 178  	}
 179  	return nil
 180  }
 181  
 182  type WafRatelimitCharacteristicsCriteriaCriteriaCriteria struct {
 183  	MatchType *string `json:"MatchType,omitempty" xml:"MatchType,omitempty"`
 184  }
 185  
 186  func (s WafRatelimitCharacteristicsCriteriaCriteriaCriteria) String() string {
 187  	return dara.Prettify(s)
 188  }
 189  
 190  func (s WafRatelimitCharacteristicsCriteriaCriteriaCriteria) GoString() string {
 191  	return s.String()
 192  }
 193  
 194  func (s *WafRatelimitCharacteristicsCriteriaCriteriaCriteria) GetMatchType() *string {
 195  	return s.MatchType
 196  }
 197  
 198  func (s *WafRatelimitCharacteristicsCriteriaCriteriaCriteria) SetMatchType(v string) *WafRatelimitCharacteristicsCriteriaCriteriaCriteria {
 199  	s.MatchType = &v
 200  	return s
 201  }
 202  
 203  func (s *WafRatelimitCharacteristicsCriteriaCriteriaCriteria) Validate() error {
 204  	return dara.Validate(s)
 205  }
 206