diff --git a/algoliasearch/Models/Abtesting/ABTestConfiguration.cs b/algoliasearch/Models/Abtesting/ABTestConfiguration.cs index 6d2dcd62..f809c8b0 100644 --- a/algoliasearch/Models/Abtesting/ABTestConfiguration.cs +++ b/algoliasearch/Models/Abtesting/ABTestConfiguration.cs @@ -19,15 +19,8 @@ public partial class ABTestConfiguration /// /// Initializes a new instance of the ABTestConfiguration class. /// - [JsonConstructor] - public ABTestConfiguration() { } - /// - /// Initializes a new instance of the ABTestConfiguration class. - /// - /// outliers (required). - public ABTestConfiguration(Outliers outliers) + public ABTestConfiguration() { - Outliers = outliers ?? throw new ArgumentNullException(nameof(outliers)); } /// diff --git a/algoliasearch/Models/Abtesting/Variant.cs b/algoliasearch/Models/Abtesting/Variant.cs index 3b2f07ff..6db34acd 100644 --- a/algoliasearch/Models/Abtesting/Variant.cs +++ b/algoliasearch/Models/Abtesting/Variant.cs @@ -27,7 +27,6 @@ public Variant() { } /// Number of add-to-cart events for this variant. (required). /// Number of click events for this variant. (required). /// Number of click events for this variant. (required). - /// Description for this variant. (required). /// Index name of the A/B test variant (case-sensitive). (required). /// Number of [searches without results](https://www.algolia.com/doc/guides/search-analytics/concepts/metrics/#searches-without-results) for this variant. (required). /// Number of purchase events for this variant. (required). @@ -35,12 +34,11 @@ public Variant() { } /// Percentage of search requests each variant receives. (required). /// Number of users that made searches to this variant. (required). /// Number of users that made tracked searches to this variant. (required). - 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; diff --git a/algoliasearch/Models/Recommend/RecommendationsResults.cs b/algoliasearch/Models/Recommend/RecommendationsResults.cs index e0015a39..287d9aca 100644 --- a/algoliasearch/Models/Recommend/RecommendationsResults.cs +++ b/algoliasearch/Models/Recommend/RecommendationsResults.cs @@ -66,6 +66,13 @@ public RecommendationsResults(int processingTimeMS, List hit [JsonPropertyName("exhaustive")] public Exhaustive Exhaustive { get; set; } + /// + /// Rules applied to the query. + /// + /// Rules applied to the query. + [JsonPropertyName("appliedRules")] + public List AppliedRules { get; set; } + /// /// See the `facetsCount` field of the `exhaustive` object in the response. /// @@ -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"); @@ -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)) && @@ -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(); diff --git a/algoliasearch/Models/Search/BrowseResponse.cs b/algoliasearch/Models/Search/BrowseResponse.cs index cbf00ac7..49be80e5 100644 --- a/algoliasearch/Models/Search/BrowseResponse.cs +++ b/algoliasearch/Models/Search/BrowseResponse.cs @@ -70,6 +70,13 @@ public BrowseResponse(int processingTimeMS, List hits, string query, string v [JsonPropertyName("exhaustive")] public Exhaustive Exhaustive { get; set; } + /// + /// Rules applied to the query. + /// + /// Rules applied to the query. + [JsonPropertyName("appliedRules")] + public List AppliedRules { get; set; } + /// /// See the `facetsCount` field of the `exhaustive` object in the response. /// @@ -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"); @@ -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)) && @@ -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(); diff --git a/algoliasearch/Models/Search/GetApiKeyResponse.cs b/algoliasearch/Models/Search/GetApiKeyResponse.cs index 2d93c04f..b2e5a4d9 100644 --- a/algoliasearch/Models/Search/GetApiKeyResponse.cs +++ b/algoliasearch/Models/Search/GetApiKeyResponse.cs @@ -24,10 +24,12 @@ public GetApiKeyResponse() { } /// /// Initializes a new instance of the GetApiKeyResponse class. /// + /// API key. (required). /// Timestamp when the object was created, in milliseconds since the Unix epoch. (required). /// 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). - public GetApiKeyResponse(long createdAt, List acl) + public GetApiKeyResponse(string value, long createdAt, List acl) { + Value = value ?? throw new ArgumentNullException(nameof(value)); CreatedAt = createdAt; Acl = acl ?? throw new ArgumentNullException(nameof(acl)); } diff --git a/algoliasearch/Models/Search/GetObjectsResponse.cs b/algoliasearch/Models/Search/GetObjectsResponse.cs index 790cf1d4..9d78a2e8 100644 --- a/algoliasearch/Models/Search/GetObjectsResponse.cs +++ b/algoliasearch/Models/Search/GetObjectsResponse.cs @@ -19,15 +19,8 @@ public partial class GetObjectsResponse /// /// Initializes a new instance of the GetObjectsResponse class. /// - [JsonConstructor] - public GetObjectsResponse() { } - /// - /// Initializes a new instance of the GetObjectsResponse class. - /// - /// Retrieved records. (required). - public GetObjectsResponse(List results) + public GetObjectsResponse() { - Results = results ?? throw new ArgumentNullException(nameof(results)); } /// diff --git a/algoliasearch/Models/Search/SearchResponse.cs b/algoliasearch/Models/Search/SearchResponse.cs index 6e5d0470..6f7114ec 100644 --- a/algoliasearch/Models/Search/SearchResponse.cs +++ b/algoliasearch/Models/Search/SearchResponse.cs @@ -74,6 +74,13 @@ public SearchResponse(int processingTimeMS, List hits, string query, string v [JsonPropertyName("exhaustive")] public Exhaustive Exhaustive { get; set; } + /// + /// Rules applied to the query. + /// + /// Rules applied to the query. + [JsonPropertyName("appliedRules")] + public List AppliedRules { get; set; } + /// /// See the `facetsCount` field of the `exhaustive` object in the response. /// @@ -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"); @@ -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)) && @@ -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();