|
| 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.Composition; |
| 13 | + |
| 14 | +/// <summary> |
| 15 | +/// Deduplication configures the methods used to resolve duplicate items between main search results and injected group results. |
| 16 | +/// </summary> |
| 17 | +public partial class Deduplication |
| 18 | +{ |
| 19 | + /// <summary> |
| 20 | + /// Gets or Sets Positioning |
| 21 | + /// </summary> |
| 22 | + [JsonPropertyName("positioning")] |
| 23 | + public DedupPositioning? Positioning { get; set; } |
| 24 | + |
| 25 | + /// <summary> |
| 26 | + /// Initializes a new instance of the Deduplication class. |
| 27 | + /// </summary> |
| 28 | + [JsonConstructor] |
| 29 | + public Deduplication() { } |
| 30 | + |
| 31 | + /// <summary> |
| 32 | + /// Initializes a new instance of the Deduplication class. |
| 33 | + /// </summary> |
| 34 | + /// <param name="positioning">positioning (required).</param> |
| 35 | + public Deduplication(DedupPositioning? positioning) |
| 36 | + { |
| 37 | + Positioning = positioning; |
| 38 | + } |
| 39 | + |
| 40 | + /// <summary> |
| 41 | + /// Returns the string presentation of the object |
| 42 | + /// </summary> |
| 43 | + /// <returns>String presentation of the object</returns> |
| 44 | + public override string ToString() |
| 45 | + { |
| 46 | + StringBuilder sb = new StringBuilder(); |
| 47 | + sb.Append("class Deduplication {\n"); |
| 48 | + sb.Append(" Positioning: ").Append(Positioning).Append("\n"); |
| 49 | + sb.Append("}\n"); |
| 50 | + return sb.ToString(); |
| 51 | + } |
| 52 | + |
| 53 | + /// <summary> |
| 54 | + /// Returns the JSON string presentation of the object |
| 55 | + /// </summary> |
| 56 | + /// <returns>JSON string presentation of the object</returns> |
| 57 | + public virtual string ToJson() |
| 58 | + { |
| 59 | + return JsonSerializer.Serialize(this, JsonConfig.Options); |
| 60 | + } |
| 61 | + |
| 62 | + /// <summary> |
| 63 | + /// Returns true if objects are equal |
| 64 | + /// </summary> |
| 65 | + /// <param name="obj">Object to be compared</param> |
| 66 | + /// <returns>Boolean</returns> |
| 67 | + public override bool Equals(object obj) |
| 68 | + { |
| 69 | + if (obj is not Deduplication input) |
| 70 | + { |
| 71 | + return false; |
| 72 | + } |
| 73 | + |
| 74 | + return (Positioning == input.Positioning || Positioning.Equals(input.Positioning)); |
| 75 | + } |
| 76 | + |
| 77 | + /// <summary> |
| 78 | + /// Gets the hash code |
| 79 | + /// </summary> |
| 80 | + /// <returns>Hash code</returns> |
| 81 | + public override int GetHashCode() |
| 82 | + { |
| 83 | + unchecked // Overflow is fine, just wrap |
| 84 | + { |
| 85 | + int hashCode = 41; |
| 86 | + hashCode = (hashCode * 59) + Positioning.GetHashCode(); |
| 87 | + return hashCode; |
| 88 | + } |
| 89 | + } |
| 90 | +} |
0 commit comments