Skip to content

Commit fd4610e

Browse files
fix(specs): add deprecated field condition in rule schemas (generated)
algolia/api-clients-automation#5983 Co-authored-by: algolia-bot <accounts+algolia-api-client-bot@algolia.com> Co-authored-by: Mario-Alexandru Dan <marioalexandrudan@gmail.com>
1 parent db78dfd commit fd4610e

1 file changed

Lines changed: 13 additions & 4 deletions

File tree

lib/algolia/models/search/rule.rb

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ class Rule
3030

3131
attr_accessor :scope
3232

33+
attr_accessor :condition
34+
3335
# Attribute mapping from ruby-style variable name to JSON key.
3436
def self.attribute_map
3537
{
@@ -40,7 +42,8 @@ def self.attribute_map
4042
:enabled => :enabled,
4143
:validity => :validity,
4244
:tags => :tags,
43-
:scope => :scope
45+
:scope => :scope,
46+
:condition => :condition
4447
}
4548
end
4649

@@ -54,7 +57,8 @@ def self.types_mapping
5457
:enabled => :"Boolean",
5558
:validity => :"Array<TimeRange>",
5659
:tags => :"Array<String>",
57-
:scope => :"String"
60+
:scope => :"String",
61+
:condition => :"Condition"
5862
}
5963
end
6064

@@ -126,6 +130,10 @@ def initialize(attributes = {})
126130
if attributes.key?(:scope)
127131
self.scope = attributes[:scope]
128132
end
133+
134+
if attributes.key?(:condition)
135+
self.condition = attributes[:condition]
136+
end
129137
end
130138

131139
# Checks equality by comparing each attribute.
@@ -140,7 +148,8 @@ def ==(other)
140148
enabled == other.enabled &&
141149
validity == other.validity &&
142150
tags == other.tags &&
143-
scope == other.scope
151+
scope == other.scope &&
152+
condition == other.condition
144153
end
145154

146155
# @see the `==` method
@@ -152,7 +161,7 @@ def eql?(other)
152161
# Calculates hash code according to all attributes.
153162
# @return [Integer] Hash code
154163
def hash
155-
[algolia_object_id, conditions, consequence, description, enabled, validity, tags, scope].hash
164+
[algolia_object_id, conditions, consequence, description, enabled, validity, tags, scope, condition].hash
156165
end
157166

158167
# Builds the object from hash

0 commit comments

Comments
 (0)