|
| 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 | +/// Feed formatted as an injection. |
| 16 | +/// </summary> |
| 17 | +public partial class FeedInjection |
| 18 | +{ |
| 19 | + /// <summary> |
| 20 | + /// Initializes a new instance of the FeedInjection class. |
| 21 | + /// </summary> |
| 22 | + [JsonConstructor] |
| 23 | + public FeedInjection() { } |
| 24 | + |
| 25 | + /// <summary> |
| 26 | + /// Initializes a new instance of the FeedInjection class. |
| 27 | + /// </summary> |
| 28 | + /// <param name="injection">injection (required).</param> |
| 29 | + public FeedInjection(Injection injection) |
| 30 | + { |
| 31 | + Injection = injection ?? throw new ArgumentNullException(nameof(injection)); |
| 32 | + } |
| 33 | + |
| 34 | + /// <summary> |
| 35 | + /// Gets or Sets Injection |
| 36 | + /// </summary> |
| 37 | + [JsonPropertyName("injection")] |
| 38 | + public Injection Injection { get; set; } |
| 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 FeedInjection {\n"); |
| 48 | + sb.Append(" Injection: ").Append(Injection).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 FeedInjection input) |
| 70 | + { |
| 71 | + return false; |
| 72 | + } |
| 73 | + |
| 74 | + return ( |
| 75 | + Injection == input.Injection || (Injection != null && Injection.Equals(input.Injection)) |
| 76 | + ); |
| 77 | + } |
| 78 | + |
| 79 | + /// <summary> |
| 80 | + /// Gets the hash code |
| 81 | + /// </summary> |
| 82 | + /// <returns>Hash code</returns> |
| 83 | + public override int GetHashCode() |
| 84 | + { |
| 85 | + unchecked // Overflow is fine, just wrap |
| 86 | + { |
| 87 | + int hashCode = 41; |
| 88 | + if (Injection != null) |
| 89 | + { |
| 90 | + hashCode = (hashCode * 59) + Injection.GetHashCode(); |
| 91 | + } |
| 92 | + return hashCode; |
| 93 | + } |
| 94 | + } |
| 95 | +} |
0 commit comments