Skip to content

Commit

Permalink
fix(specs): multiple clients fixes (generated)
Browse files Browse the repository at this point in the history
algolia/api-clients-automation#3971

Co-authored-by: algolia-bot <accounts+algolia-api-client-bot@algolia.com>
  • Loading branch information
algolia-bot committed Oct 16, 2024
1 parent 61fa2c0 commit 9e7f0f1
Show file tree
Hide file tree
Showing 7 changed files with 45 additions and 20 deletions.
9 changes: 1 addition & 8 deletions algoliasearch/Models/Abtesting/ABTestConfiguration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,8 @@ public partial class ABTestConfiguration
/// <summary>
/// Initializes a new instance of the ABTestConfiguration class.
/// </summary>
[JsonConstructor]
public ABTestConfiguration() { }
/// <summary>
/// Initializes a new instance of the ABTestConfiguration class.
/// </summary>
/// <param name="outliers">outliers (required).</param>
public ABTestConfiguration(Outliers outliers)
public ABTestConfiguration()
{
Outliers = outliers ?? throw new ArgumentNullException(nameof(outliers));
}

/// <summary>
Expand Down
4 changes: 1 addition & 3 deletions algoliasearch/Models/Abtesting/Variant.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,20 +27,18 @@ public Variant() { }
/// <param name="addToCartCount">Number of add-to-cart events for this variant. (required).</param>
/// <param name="clickCount">Number of click events for this variant. (required).</param>
/// <param name="conversionCount">Number of click events for this variant. (required).</param>
/// <param name="description">Description for this variant. (required).</param>
/// <param name="index">Index name of the A/B test variant (case-sensitive). (required).</param>
/// <param name="noResultCount">Number of [searches without results](https://www.algolia.com/doc/guides/search-analytics/concepts/metrics/#searches-without-results) for this variant. (required).</param>
/// <param name="purchaseCount">Number of purchase events for this variant. (required).</param>
/// <param name="searchCount">Number of searches for this variant. (required).</param>
/// <param name="trafficPercentage">Percentage of search requests each variant receives. (required).</param>
/// <param name="userCount">Number of users that made searches to this variant. (required).</param>
/// <param name="trackedUserCount">Number of users that made tracked searches to this variant. (required).</param>
public Variant(int addToCartCount, int clickCount, int conversionCount, string description, string index, int? noResultCount, int purchaseCount, int? searchCount, int trafficPercentage, int? userCount, int? trackedUserCount)
public Variant(int addToCartCount, int clickCount, int conversionCount, string index, int? noResultCount, int purchaseCount, int? searchCount, int trafficPercentage, int? userCount, int? trackedUserCount)
{
AddToCartCount = addToCartCount;
ClickCount = clickCount;
ConversionCount = conversionCount;
Description = description ?? throw new ArgumentNullException(nameof(description));
Index = index ?? throw new ArgumentNullException(nameof(index));
NoResultCount = noResultCount ?? throw new ArgumentNullException(nameof(noResultCount));
PurchaseCount = purchaseCount;
Expand Down
13 changes: 13 additions & 0 deletions algoliasearch/Models/Recommend/RecommendationsResults.cs
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,13 @@ public RecommendationsResults(int processingTimeMS, List<RecommendationsHit> hit
[JsonPropertyName("exhaustive")]
public Exhaustive Exhaustive { get; set; }

/// <summary>
/// Rules applied to the query.
/// </summary>
/// <value>Rules applied to the query.</value>
[JsonPropertyName("appliedRules")]
public List<object> AppliedRules { get; set; }

/// <summary>
/// See the `facetsCount` field of the `exhaustive` object in the response.
/// </summary>
Expand Down Expand Up @@ -254,6 +261,7 @@ public override string ToString()
sb.Append(" AroundLatLng: ").Append(AroundLatLng).Append("\n");
sb.Append(" AutomaticRadius: ").Append(AutomaticRadius).Append("\n");
sb.Append(" Exhaustive: ").Append(Exhaustive).Append("\n");
sb.Append(" AppliedRules: ").Append(AppliedRules).Append("\n");
sb.Append(" ExhaustiveFacetsCount: ").Append(ExhaustiveFacetsCount).Append("\n");
sb.Append(" ExhaustiveNbHits: ").Append(ExhaustiveNbHits).Append("\n");
sb.Append(" ExhaustiveTypo: ").Append(ExhaustiveTypo).Append("\n");
Expand Down Expand Up @@ -310,6 +318,7 @@ public override bool Equals(object obj)
(AroundLatLng == input.AroundLatLng || (AroundLatLng != null && AroundLatLng.Equals(input.AroundLatLng))) &&
(AutomaticRadius == input.AutomaticRadius || (AutomaticRadius != null && AutomaticRadius.Equals(input.AutomaticRadius))) &&
(Exhaustive == input.Exhaustive || (Exhaustive != null && Exhaustive.Equals(input.Exhaustive))) &&
(AppliedRules == input.AppliedRules || AppliedRules != null && input.AppliedRules != null && AppliedRules.SequenceEqual(input.AppliedRules)) &&
(ExhaustiveFacetsCount == input.ExhaustiveFacetsCount || ExhaustiveFacetsCount.Equals(input.ExhaustiveFacetsCount)) &&
(ExhaustiveNbHits == input.ExhaustiveNbHits || ExhaustiveNbHits.Equals(input.ExhaustiveNbHits)) &&
(ExhaustiveTypo == input.ExhaustiveTypo || ExhaustiveTypo.Equals(input.ExhaustiveTypo)) &&
Expand Down Expand Up @@ -360,6 +369,10 @@ public override int GetHashCode()
{
hashCode = (hashCode * 59) + Exhaustive.GetHashCode();
}
if (AppliedRules != null)
{
hashCode = (hashCode * 59) + AppliedRules.GetHashCode();
}
hashCode = (hashCode * 59) + ExhaustiveFacetsCount.GetHashCode();
hashCode = (hashCode * 59) + ExhaustiveNbHits.GetHashCode();
hashCode = (hashCode * 59) + ExhaustiveTypo.GetHashCode();
Expand Down
13 changes: 13 additions & 0 deletions algoliasearch/Models/Search/BrowseResponse.cs
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,13 @@ public BrowseResponse(int processingTimeMS, List<T> hits, string query, string v
[JsonPropertyName("exhaustive")]
public Exhaustive Exhaustive { get; set; }

/// <summary>
/// Rules applied to the query.
/// </summary>
/// <value>Rules applied to the query.</value>
[JsonPropertyName("appliedRules")]
public List<object> AppliedRules { get; set; }

/// <summary>
/// See the `facetsCount` field of the `exhaustive` object in the response.
/// </summary>
Expand Down Expand Up @@ -280,6 +287,7 @@ public override string ToString()
sb.Append(" AroundLatLng: ").Append(AroundLatLng).Append("\n");
sb.Append(" AutomaticRadius: ").Append(AutomaticRadius).Append("\n");
sb.Append(" Exhaustive: ").Append(Exhaustive).Append("\n");
sb.Append(" AppliedRules: ").Append(AppliedRules).Append("\n");
sb.Append(" ExhaustiveFacetsCount: ").Append(ExhaustiveFacetsCount).Append("\n");
sb.Append(" ExhaustiveNbHits: ").Append(ExhaustiveNbHits).Append("\n");
sb.Append(" ExhaustiveTypo: ").Append(ExhaustiveTypo).Append("\n");
Expand Down Expand Up @@ -339,6 +347,7 @@ public override bool Equals(object obj)
(AroundLatLng == input.AroundLatLng || (AroundLatLng != null && AroundLatLng.Equals(input.AroundLatLng))) &&
(AutomaticRadius == input.AutomaticRadius || (AutomaticRadius != null && AutomaticRadius.Equals(input.AutomaticRadius))) &&
(Exhaustive == input.Exhaustive || (Exhaustive != null && Exhaustive.Equals(input.Exhaustive))) &&
(AppliedRules == input.AppliedRules || AppliedRules != null && input.AppliedRules != null && AppliedRules.SequenceEqual(input.AppliedRules)) &&
(ExhaustiveFacetsCount == input.ExhaustiveFacetsCount || ExhaustiveFacetsCount.Equals(input.ExhaustiveFacetsCount)) &&
(ExhaustiveNbHits == input.ExhaustiveNbHits || ExhaustiveNbHits.Equals(input.ExhaustiveNbHits)) &&
(ExhaustiveTypo == input.ExhaustiveTypo || ExhaustiveTypo.Equals(input.ExhaustiveTypo)) &&
Expand Down Expand Up @@ -392,6 +401,10 @@ public override int GetHashCode()
{
hashCode = (hashCode * 59) + Exhaustive.GetHashCode();
}
if (AppliedRules != null)
{
hashCode = (hashCode * 59) + AppliedRules.GetHashCode();
}
hashCode = (hashCode * 59) + ExhaustiveFacetsCount.GetHashCode();
hashCode = (hashCode * 59) + ExhaustiveNbHits.GetHashCode();
hashCode = (hashCode * 59) + ExhaustiveTypo.GetHashCode();
Expand Down
4 changes: 3 additions & 1 deletion algoliasearch/Models/Search/GetApiKeyResponse.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,12 @@ public GetApiKeyResponse() { }
/// <summary>
/// Initializes a new instance of the GetApiKeyResponse class.
/// </summary>
/// <param name="value">API key. (required).</param>
/// <param name="createdAt">Timestamp when the object was created, in milliseconds since the Unix epoch. (required).</param>
/// <param name="acl">Permissions that determine the type of API requests this key can make. The required ACL is listed in each endpoint's reference. For more information, see [access control list](https://www.algolia.com/doc/guides/security/api-keys/#access-control-list-acl). (required).</param>
public GetApiKeyResponse(long createdAt, List<Acl> acl)
public GetApiKeyResponse(string value, long createdAt, List<Acl> acl)
{
Value = value ?? throw new ArgumentNullException(nameof(value));
CreatedAt = createdAt;
Acl = acl ?? throw new ArgumentNullException(nameof(acl));
}
Expand Down
9 changes: 1 addition & 8 deletions algoliasearch/Models/Search/GetObjectsResponse.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,8 @@ public partial class GetObjectsResponse<T>
/// <summary>
/// Initializes a new instance of the GetObjectsResponse class.
/// </summary>
[JsonConstructor]
public GetObjectsResponse() { }
/// <summary>
/// Initializes a new instance of the GetObjectsResponse class.
/// </summary>
/// <param name="results">Retrieved records. (required).</param>
public GetObjectsResponse(List<T> results)
public GetObjectsResponse()
{
Results = results ?? throw new ArgumentNullException(nameof(results));
}

/// <summary>
Expand Down
13 changes: 13 additions & 0 deletions algoliasearch/Models/Search/SearchResponse.cs
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,13 @@ public SearchResponse(int processingTimeMS, List<T> hits, string query, string v
[JsonPropertyName("exhaustive")]
public Exhaustive Exhaustive { get; set; }

/// <summary>
/// Rules applied to the query.
/// </summary>
/// <value>Rules applied to the query.</value>
[JsonPropertyName("appliedRules")]
public List<object> AppliedRules { get; set; }

/// <summary>
/// See the `facetsCount` field of the `exhaustive` object in the response.
/// </summary>
Expand Down Expand Up @@ -283,6 +290,7 @@ public override string ToString()
sb.Append(" AroundLatLng: ").Append(AroundLatLng).Append("\n");
sb.Append(" AutomaticRadius: ").Append(AutomaticRadius).Append("\n");
sb.Append(" Exhaustive: ").Append(Exhaustive).Append("\n");
sb.Append(" AppliedRules: ").Append(AppliedRules).Append("\n");
sb.Append(" ExhaustiveFacetsCount: ").Append(ExhaustiveFacetsCount).Append("\n");
sb.Append(" ExhaustiveNbHits: ").Append(ExhaustiveNbHits).Append("\n");
sb.Append(" ExhaustiveTypo: ").Append(ExhaustiveTypo).Append("\n");
Expand Down Expand Up @@ -342,6 +350,7 @@ public override bool Equals(object obj)
(AroundLatLng == input.AroundLatLng || (AroundLatLng != null && AroundLatLng.Equals(input.AroundLatLng))) &&
(AutomaticRadius == input.AutomaticRadius || (AutomaticRadius != null && AutomaticRadius.Equals(input.AutomaticRadius))) &&
(Exhaustive == input.Exhaustive || (Exhaustive != null && Exhaustive.Equals(input.Exhaustive))) &&
(AppliedRules == input.AppliedRules || AppliedRules != null && input.AppliedRules != null && AppliedRules.SequenceEqual(input.AppliedRules)) &&
(ExhaustiveFacetsCount == input.ExhaustiveFacetsCount || ExhaustiveFacetsCount.Equals(input.ExhaustiveFacetsCount)) &&
(ExhaustiveNbHits == input.ExhaustiveNbHits || ExhaustiveNbHits.Equals(input.ExhaustiveNbHits)) &&
(ExhaustiveTypo == input.ExhaustiveTypo || ExhaustiveTypo.Equals(input.ExhaustiveTypo)) &&
Expand Down Expand Up @@ -395,6 +404,10 @@ public override int GetHashCode()
{
hashCode = (hashCode * 59) + Exhaustive.GetHashCode();
}
if (AppliedRules != null)
{
hashCode = (hashCode * 59) + AppliedRules.GetHashCode();
}
hashCode = (hashCode * 59) + ExhaustiveFacetsCount.GetHashCode();
hashCode = (hashCode * 59) + ExhaustiveNbHits.GetHashCode();
hashCode = (hashCode * 59) + ExhaustiveTypo.GetHashCode();
Expand Down

0 comments on commit 9e7f0f1

Please sign in to comment.