diff --git a/algoliasearch/Models/Personalization/EventScoring.cs b/algoliasearch/Models/Personalization/EventsScoring.cs similarity index 89% rename from algoliasearch/Models/Personalization/EventScoring.cs rename to algoliasearch/Models/Personalization/EventsScoring.cs index 35c5824f2..845f83348 100644 --- a/algoliasearch/Models/Personalization/EventScoring.cs +++ b/algoliasearch/Models/Personalization/EventsScoring.cs @@ -12,9 +12,9 @@ namespace Algolia.Search.Models.Personalization; /// -/// EventScoring +/// EventsScoring /// -public partial class EventScoring +public partial class EventsScoring { /// @@ -23,17 +23,17 @@ public partial class EventScoring [JsonPropertyName("eventType")] public EventType? EventType { get; set; } /// - /// Initializes a new instance of the EventScoring class. + /// Initializes a new instance of the EventsScoring class. /// [JsonConstructor] - public EventScoring() { } + public EventsScoring() { } /// - /// Initializes a new instance of the EventScoring class. + /// Initializes a new instance of the EventsScoring class. /// /// Event score. (required). /// Event name. (required). /// eventType (required). - public EventScoring(int score, string eventName, EventType? eventType) + public EventsScoring(int score, string eventName, EventType? eventType) { Score = score; EventName = eventName ?? throw new ArgumentNullException(nameof(eventName)); @@ -61,7 +61,7 @@ public EventScoring(int score, string eventName, EventType? eventType) public override string ToString() { StringBuilder sb = new StringBuilder(); - sb.Append("class EventScoring {\n"); + sb.Append("class EventsScoring {\n"); sb.Append(" Score: ").Append(Score).Append("\n"); sb.Append(" EventName: ").Append(EventName).Append("\n"); sb.Append(" EventType: ").Append(EventType).Append("\n"); @@ -85,7 +85,7 @@ public virtual string ToJson() /// Boolean public override bool Equals(object obj) { - if (obj is not EventScoring input) + if (obj is not EventsScoring input) { return false; } diff --git a/algoliasearch/Models/Personalization/FacetScoring.cs b/algoliasearch/Models/Personalization/FacetsScoring.cs similarity index 88% rename from algoliasearch/Models/Personalization/FacetScoring.cs rename to algoliasearch/Models/Personalization/FacetsScoring.cs index 9b8da94d7..2b0ab53d7 100644 --- a/algoliasearch/Models/Personalization/FacetScoring.cs +++ b/algoliasearch/Models/Personalization/FacetsScoring.cs @@ -12,21 +12,21 @@ namespace Algolia.Search.Models.Personalization; /// -/// FacetScoring +/// FacetsScoring /// -public partial class FacetScoring +public partial class FacetsScoring { /// - /// Initializes a new instance of the FacetScoring class. + /// Initializes a new instance of the FacetsScoring class. /// [JsonConstructor] - public FacetScoring() { } + public FacetsScoring() { } /// - /// Initializes a new instance of the FacetScoring class. + /// Initializes a new instance of the FacetsScoring class. /// /// Event score. (required). /// Facet attribute name. (required). - public FacetScoring(int score, string facetName) + public FacetsScoring(int score, string facetName) { Score = score; FacetName = facetName ?? throw new ArgumentNullException(nameof(facetName)); @@ -53,7 +53,7 @@ public FacetScoring(int score, string facetName) public override string ToString() { StringBuilder sb = new StringBuilder(); - sb.Append("class FacetScoring {\n"); + sb.Append("class FacetsScoring {\n"); sb.Append(" Score: ").Append(Score).Append("\n"); sb.Append(" FacetName: ").Append(FacetName).Append("\n"); sb.Append("}\n"); @@ -76,7 +76,7 @@ public virtual string ToJson() /// Boolean public override bool Equals(object obj) { - if (obj is not FacetScoring input) + if (obj is not FacetsScoring input) { return false; } diff --git a/algoliasearch/Models/Personalization/PersonalizationStrategyParams.cs b/algoliasearch/Models/Personalization/PersonalizationStrategyParams.cs index 943b88da6..4e320127d 100644 --- a/algoliasearch/Models/Personalization/PersonalizationStrategyParams.cs +++ b/algoliasearch/Models/Personalization/PersonalizationStrategyParams.cs @@ -24,13 +24,13 @@ public PersonalizationStrategyParams() { } /// /// Initializes a new instance of the PersonalizationStrategyParams class. /// - /// Scores associated with each event. The higher the scores, the higher the impact of those events on the personalization of search results. (required). - /// Scores associated with each facet. The higher the scores, the higher the impact of those events on the personalization of search results. (required). + /// Scores associated with each event. The higher the scores, the higher the impact of those events on the personalization of search results. (required). + /// Scores associated with each facet. The higher the scores, the higher the impact of those events on the personalization of search results. (required). /// Impact of personalization on the search results. If set to 0, personalization has no impact on the search results. (required). - public PersonalizationStrategyParams(List eventScoring, List facetScoring, int personalizationImpact) + public PersonalizationStrategyParams(List eventsScoring, List facetsScoring, int personalizationImpact) { - EventScoring = eventScoring ?? throw new ArgumentNullException(nameof(eventScoring)); - FacetScoring = facetScoring ?? throw new ArgumentNullException(nameof(facetScoring)); + EventsScoring = eventsScoring ?? throw new ArgumentNullException(nameof(eventsScoring)); + FacetsScoring = facetsScoring ?? throw new ArgumentNullException(nameof(facetsScoring)); PersonalizationImpact = personalizationImpact; } @@ -38,15 +38,15 @@ public PersonalizationStrategyParams(List eventScoring, List /// Scores associated with each event. The higher the scores, the higher the impact of those events on the personalization of search results. - [JsonPropertyName("eventScoring")] - public List EventScoring { get; set; } + [JsonPropertyName("eventsScoring")] + public List EventsScoring { get; set; } /// /// Scores associated with each facet. The higher the scores, the higher the impact of those events on the personalization of search results. /// /// Scores associated with each facet. The higher the scores, the higher the impact of those events on the personalization of search results. - [JsonPropertyName("facetScoring")] - public List FacetScoring { get; set; } + [JsonPropertyName("facetsScoring")] + public List FacetsScoring { get; set; } /// /// Impact of personalization on the search results. If set to 0, personalization has no impact on the search results. @@ -63,8 +63,8 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class PersonalizationStrategyParams {\n"); - sb.Append(" EventScoring: ").Append(EventScoring).Append("\n"); - sb.Append(" FacetScoring: ").Append(FacetScoring).Append("\n"); + sb.Append(" EventsScoring: ").Append(EventsScoring).Append("\n"); + sb.Append(" FacetsScoring: ").Append(FacetsScoring).Append("\n"); sb.Append(" PersonalizationImpact: ").Append(PersonalizationImpact).Append("\n"); sb.Append("}\n"); return sb.ToString(); @@ -92,8 +92,8 @@ public override bool Equals(object obj) } return - (EventScoring == input.EventScoring || EventScoring != null && input.EventScoring != null && EventScoring.SequenceEqual(input.EventScoring)) && - (FacetScoring == input.FacetScoring || FacetScoring != null && input.FacetScoring != null && FacetScoring.SequenceEqual(input.FacetScoring)) && + (EventsScoring == input.EventsScoring || EventsScoring != null && input.EventsScoring != null && EventsScoring.SequenceEqual(input.EventsScoring)) && + (FacetsScoring == input.FacetsScoring || FacetsScoring != null && input.FacetsScoring != null && FacetsScoring.SequenceEqual(input.FacetsScoring)) && (PersonalizationImpact == input.PersonalizationImpact || PersonalizationImpact.Equals(input.PersonalizationImpact)); } @@ -106,13 +106,13 @@ public override int GetHashCode() unchecked // Overflow is fine, just wrap { int hashCode = 41; - if (EventScoring != null) + if (EventsScoring != null) { - hashCode = (hashCode * 59) + EventScoring.GetHashCode(); + hashCode = (hashCode * 59) + EventsScoring.GetHashCode(); } - if (FacetScoring != null) + if (FacetsScoring != null) { - hashCode = (hashCode * 59) + FacetScoring.GetHashCode(); + hashCode = (hashCode * 59) + FacetsScoring.GetHashCode(); } hashCode = (hashCode * 59) + PersonalizationImpact.GetHashCode(); return hashCode;