@@ -26,6 +26,10 @@ class Rule
2626 # Time periods when the rule is active.
2727 attr_accessor :validity
2828
29+ attr_accessor :tags
30+
31+ attr_accessor :scope
32+
2933 # Attribute mapping from ruby-style variable name to JSON key.
3034 def self . attribute_map
3135 {
@@ -34,7 +38,9 @@ def self.attribute_map
3438 :consequence => :consequence ,
3539 :description => :description ,
3640 :enabled => :enabled ,
37- :validity => :validity
41+ :validity => :validity ,
42+ :tags => :tags ,
43+ :scope => :scope
3844 }
3945 end
4046
@@ -46,7 +52,9 @@ def self.types_mapping
4652 :consequence => :"Consequence" ,
4753 :description => :"String" ,
4854 :enabled => :"Boolean" ,
49- :validity => :"Array<TimeRange>"
55+ :validity => :"Array<TimeRange>" ,
56+ :tags => :"Array<String>" ,
57+ :scope => :"String"
5058 }
5159 end
5260
@@ -108,6 +116,16 @@ def initialize(attributes = {})
108116 self . validity = value
109117 end
110118 end
119+
120+ if attributes . key? ( :tags )
121+ if ( value = attributes [ :tags ] ) . is_a? ( Array )
122+ self . tags = value
123+ end
124+ end
125+
126+ if attributes . key? ( :scope )
127+ self . scope = attributes [ :scope ]
128+ end
111129 end
112130
113131 # Checks equality by comparing each attribute.
@@ -120,7 +138,9 @@ def ==(other)
120138 consequence == other . consequence &&
121139 description == other . description &&
122140 enabled == other . enabled &&
123- validity == other . validity
141+ validity == other . validity &&
142+ tags == other . tags &&
143+ scope == other . scope
124144 end
125145
126146 # @see the `==` method
@@ -132,7 +152,7 @@ def eql?(other)
132152 # Calculates hash code according to all attributes.
133153 # @return [Integer] Hash code
134154 def hash
135- [ algolia_object_id , conditions , consequence , description , enabled , validity ] . hash
155+ [ algolia_object_id , conditions , consequence , description , enabled , validity , tags , scope ] . hash
136156 end
137157
138158 # Builds the object from hash
0 commit comments