File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed
algoliasearch/Models/Search Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff 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 }
You can’t perform that action at this time.
0 commit comments