|
| 1 | +// |
| 2 | +// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. |
| 3 | +// |
| 4 | +using System; |
| 5 | +using System.Collections.Generic; |
| 6 | +using System.Linq; |
| 7 | +using System.Text; |
| 8 | +using System.Text.Json; |
| 9 | +using System.Text.Json.Serialization; |
| 10 | +using Algolia.Search.Serializer; |
| 11 | + |
| 12 | +namespace Algolia.Search.Models.Abtesting; |
| 13 | + |
| 14 | +/// <summary> |
| 15 | +/// Configuration of feature-based filters applied to the A/B test population. |
| 16 | +/// </summary> |
| 17 | +public partial class FeatureFilters |
| 18 | +{ |
| 19 | + /// <summary> |
| 20 | + /// Initializes a new instance of the FeatureFilters class. |
| 21 | + /// </summary> |
| 22 | + public FeatureFilters() { } |
| 23 | + |
| 24 | + /// <summary> |
| 25 | + /// Whether to apply Dynamic Re-Ranking feature filters. |
| 26 | + /// </summary> |
| 27 | + /// <value>Whether to apply Dynamic Re-Ranking feature filters.</value> |
| 28 | + [JsonPropertyName("dynamicReRanking")] |
| 29 | + public bool? DynamicReRanking { get; set; } |
| 30 | + |
| 31 | + /// <summary> |
| 32 | + /// Whether to apply AI Personalization feature filters. |
| 33 | + /// </summary> |
| 34 | + /// <value>Whether to apply AI Personalization feature filters.</value> |
| 35 | + [JsonPropertyName("aiPerso")] |
| 36 | + public bool? AiPerso { get; set; } |
| 37 | + |
| 38 | + /// <summary> |
| 39 | + /// Whether to apply Multi-Signal Re-Ranking feature filters. |
| 40 | + /// </summary> |
| 41 | + /// <value>Whether to apply Multi-Signal Re-Ranking feature filters.</value> |
| 42 | + [JsonPropertyName("multiSignalRanking")] |
| 43 | + public bool? MultiSignalRanking { get; set; } |
| 44 | + |
| 45 | + /// <summary> |
| 46 | + /// Returns the string presentation of the object |
| 47 | + /// </summary> |
| 48 | + /// <returns>String presentation of the object</returns> |
| 49 | + public override string ToString() |
| 50 | + { |
| 51 | + StringBuilder sb = new StringBuilder(); |
| 52 | + sb.Append("class FeatureFilters {\n"); |
| 53 | + sb.Append(" DynamicReRanking: ").Append(DynamicReRanking).Append("\n"); |
| 54 | + sb.Append(" AiPerso: ").Append(AiPerso).Append("\n"); |
| 55 | + sb.Append(" MultiSignalRanking: ").Append(MultiSignalRanking).Append("\n"); |
| 56 | + sb.Append("}\n"); |
| 57 | + return sb.ToString(); |
| 58 | + } |
| 59 | + |
| 60 | + /// <summary> |
| 61 | + /// Returns the JSON string presentation of the object |
| 62 | + /// </summary> |
| 63 | + /// <returns>JSON string presentation of the object</returns> |
| 64 | + public virtual string ToJson() |
| 65 | + { |
| 66 | + return JsonSerializer.Serialize(this, JsonConfig.Options); |
| 67 | + } |
| 68 | + |
| 69 | + /// <summary> |
| 70 | + /// Returns true if objects are equal |
| 71 | + /// </summary> |
| 72 | + /// <param name="obj">Object to be compared</param> |
| 73 | + /// <returns>Boolean</returns> |
| 74 | + public override bool Equals(object obj) |
| 75 | + { |
| 76 | + if (obj is not FeatureFilters input) |
| 77 | + { |
| 78 | + return false; |
| 79 | + } |
| 80 | + |
| 81 | + return ( |
| 82 | + DynamicReRanking == input.DynamicReRanking |
| 83 | + || DynamicReRanking.Equals(input.DynamicReRanking) |
| 84 | + ) |
| 85 | + && (AiPerso == input.AiPerso || AiPerso.Equals(input.AiPerso)) |
| 86 | + && ( |
| 87 | + MultiSignalRanking == input.MultiSignalRanking |
| 88 | + || MultiSignalRanking.Equals(input.MultiSignalRanking) |
| 89 | + ); |
| 90 | + } |
| 91 | + |
| 92 | + /// <summary> |
| 93 | + /// Gets the hash code |
| 94 | + /// </summary> |
| 95 | + /// <returns>Hash code</returns> |
| 96 | + public override int GetHashCode() |
| 97 | + { |
| 98 | + unchecked // Overflow is fine, just wrap |
| 99 | + { |
| 100 | + int hashCode = 41; |
| 101 | + hashCode = (hashCode * 59) + DynamicReRanking.GetHashCode(); |
| 102 | + hashCode = (hashCode * 59) + AiPerso.GetHashCode(); |
| 103 | + hashCode = (hashCode * 59) + MultiSignalRanking.GetHashCode(); |
| 104 | + return hashCode; |
| 105 | + } |
| 106 | + } |
| 107 | +} |
0 commit comments