Skip to content

Commit b7f1041

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 bcf84b0 commit b7f1041

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

algoliasearch/Models/Search/Rule.cs

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,12 @@ public Rule(string objectID, Consequence consequence)
8686
[JsonPropertyName("scope")]
8787
public string Scope { get; set; }
8888

89+
/// <summary>
90+
/// Gets or Sets Condition
91+
/// </summary>
92+
[JsonPropertyName("condition")]
93+
public Condition Condition { get; set; }
94+
8995
/// <summary>
9096
/// Returns the string presentation of the object
9197
/// </summary>
@@ -102,6 +108,7 @@ public override string ToString()
102108
sb.Append(" Validity: ").Append(Validity).Append("\n");
103109
sb.Append(" Tags: ").Append(Tags).Append("\n");
104110
sb.Append(" Scope: ").Append(Scope).Append("\n");
111+
sb.Append(" Condition: ").Append(Condition).Append("\n");
105112
sb.Append("}\n");
106113
return sb.ToString();
107114
}
@@ -150,7 +157,8 @@ public override bool Equals(object obj)
150157
&& (
151158
Tags == input.Tags || Tags != null && input.Tags != null && Tags.SequenceEqual(input.Tags)
152159
)
153-
&& (Scope == input.Scope || (Scope != null && Scope.Equals(input.Scope)));
160+
&& (Scope == input.Scope || (Scope != null && Scope.Equals(input.Scope)))
161+
&& (Condition == input.Condition || (Condition != null && Condition.Equals(input.Condition)));
154162
}
155163

156164
/// <summary>
@@ -191,6 +199,10 @@ public override int GetHashCode()
191199
{
192200
hashCode = (hashCode * 59) + Scope.GetHashCode();
193201
}
202+
if (Condition != null)
203+
{
204+
hashCode = (hashCode * 59) + Condition.GetHashCode();
205+
}
194206
return hashCode;
195207
}
196208
}

0 commit comments

Comments
 (0)