Skip to content

Commit d40a50d

Browse files
algolia-botmillotp
andcommitted
fix(specs): add tags and scope to rules (generated)
algolia/api-clients-automation#5625 Co-authored-by: algolia-bot <[email protected]> Co-authored-by: Pierre Millot <[email protected]>
1 parent d5a5ae4 commit d40a50d

File tree

1 file changed

+27
-1
lines changed

1 file changed

+27
-1
lines changed

algoliasearch/Models/Search/Rule.cs

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,18 @@ public Rule(string objectID, Consequence consequence)
7474
[JsonPropertyName("validity")]
7575
public List<TimeRange> Validity { get; set; }
7676

77+
/// <summary>
78+
/// Gets or Sets Tags
79+
/// </summary>
80+
[JsonPropertyName("tags")]
81+
public List<string> Tags { get; set; }
82+
83+
/// <summary>
84+
/// Gets or Sets Scope
85+
/// </summary>
86+
[JsonPropertyName("scope")]
87+
public string Scope { get; set; }
88+
7789
/// <summary>
7890
/// Returns the string presentation of the object
7991
/// </summary>
@@ -88,6 +100,8 @@ public override string ToString()
88100
sb.Append(" Description: ").Append(Description).Append("\n");
89101
sb.Append(" Enabled: ").Append(Enabled).Append("\n");
90102
sb.Append(" Validity: ").Append(Validity).Append("\n");
103+
sb.Append(" Tags: ").Append(Tags).Append("\n");
104+
sb.Append(" Scope: ").Append(Scope).Append("\n");
91105
sb.Append("}\n");
92106
return sb.ToString();
93107
}
@@ -132,7 +146,11 @@ public override bool Equals(object obj)
132146
&& (
133147
Validity == input.Validity
134148
|| Validity != null && input.Validity != null && Validity.SequenceEqual(input.Validity)
135-
);
149+
)
150+
&& (
151+
Tags == input.Tags || Tags != null && input.Tags != null && Tags.SequenceEqual(input.Tags)
152+
)
153+
&& (Scope == input.Scope || (Scope != null && Scope.Equals(input.Scope)));
136154
}
137155

138156
/// <summary>
@@ -165,6 +183,14 @@ public override int GetHashCode()
165183
{
166184
hashCode = (hashCode * 59) + Validity.GetHashCode();
167185
}
186+
if (Tags != null)
187+
{
188+
hashCode = (hashCode * 59) + Tags.GetHashCode();
189+
}
190+
if (Scope != null)
191+
{
192+
hashCode = (hashCode * 59) + Scope.GetHashCode();
193+
}
168194
return hashCode;
169195
}
170196
}

0 commit comments

Comments
 (0)