|
| 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.Text; |
| 6 | +using System.Linq; |
| 7 | +using System.Text.Json.Serialization; |
| 8 | +using System.Collections.Generic; |
| 9 | +using Algolia.Search.Serializer; |
| 10 | +using System.Text.Json; |
| 11 | + |
| 12 | +namespace Algolia.Search.Models.Ingestion; |
| 13 | + |
| 14 | +/// <summary> |
| 15 | +/// DockerStreams |
| 16 | +/// </summary> |
| 17 | +public partial class DockerStreams |
| 18 | +{ |
| 19 | + |
| 20 | + /// <summary> |
| 21 | + /// Gets or Sets SyncMode |
| 22 | + /// </summary> |
| 23 | + [JsonPropertyName("syncMode")] |
| 24 | + public DockerStreamsSyncMode? SyncMode { get; set; } |
| 25 | + /// <summary> |
| 26 | + /// Initializes a new instance of the DockerStreams class. |
| 27 | + /// </summary> |
| 28 | + [JsonConstructor] |
| 29 | + public DockerStreams() { } |
| 30 | + /// <summary> |
| 31 | + /// Initializes a new instance of the DockerStreams class. |
| 32 | + /// </summary> |
| 33 | + /// <param name="name">The name of the stream to fetch the data from (e.g. table name). (required).</param> |
| 34 | + /// <param name="syncMode">syncMode (required).</param> |
| 35 | + public DockerStreams(string name, DockerStreamsSyncMode? syncMode) |
| 36 | + { |
| 37 | + Name = name ?? throw new ArgumentNullException(nameof(name)); |
| 38 | + SyncMode = syncMode; |
| 39 | + } |
| 40 | + |
| 41 | + /// <summary> |
| 42 | + /// The name of the stream to fetch the data from (e.g. table name). |
| 43 | + /// </summary> |
| 44 | + /// <value>The name of the stream to fetch the data from (e.g. table name).</value> |
| 45 | + [JsonPropertyName("name")] |
| 46 | + public string Name { get; set; } |
| 47 | + |
| 48 | + /// <summary> |
| 49 | + /// The properties of the stream to select (e.g. column). |
| 50 | + /// </summary> |
| 51 | + /// <value>The properties of the stream to select (e.g. column).</value> |
| 52 | + [JsonPropertyName("properties")] |
| 53 | + public List<string> Properties { get; set; } |
| 54 | + |
| 55 | + /// <summary> |
| 56 | + /// Returns the string presentation of the object |
| 57 | + /// </summary> |
| 58 | + /// <returns>String presentation of the object</returns> |
| 59 | + public override string ToString() |
| 60 | + { |
| 61 | + StringBuilder sb = new StringBuilder(); |
| 62 | + sb.Append("class DockerStreams {\n"); |
| 63 | + sb.Append(" Name: ").Append(Name).Append("\n"); |
| 64 | + sb.Append(" Properties: ").Append(Properties).Append("\n"); |
| 65 | + sb.Append(" SyncMode: ").Append(SyncMode).Append("\n"); |
| 66 | + sb.Append("}\n"); |
| 67 | + return sb.ToString(); |
| 68 | + } |
| 69 | + |
| 70 | + /// <summary> |
| 71 | + /// Returns the JSON string presentation of the object |
| 72 | + /// </summary> |
| 73 | + /// <returns>JSON string presentation of the object</returns> |
| 74 | + public virtual string ToJson() |
| 75 | + { |
| 76 | + return JsonSerializer.Serialize(this, JsonConfig.Options); |
| 77 | + } |
| 78 | + |
| 79 | + /// <summary> |
| 80 | + /// Returns true if objects are equal |
| 81 | + /// </summary> |
| 82 | + /// <param name="obj">Object to be compared</param> |
| 83 | + /// <returns>Boolean</returns> |
| 84 | + public override bool Equals(object obj) |
| 85 | + { |
| 86 | + if (obj is not DockerStreams input) |
| 87 | + { |
| 88 | + return false; |
| 89 | + } |
| 90 | + |
| 91 | + return |
| 92 | + (Name == input.Name || (Name != null && Name.Equals(input.Name))) && |
| 93 | + (Properties == input.Properties || Properties != null && input.Properties != null && Properties.SequenceEqual(input.Properties)) && |
| 94 | + (SyncMode == input.SyncMode || SyncMode.Equals(input.SyncMode)); |
| 95 | + } |
| 96 | + |
| 97 | + /// <summary> |
| 98 | + /// Gets the hash code |
| 99 | + /// </summary> |
| 100 | + /// <returns>Hash code</returns> |
| 101 | + public override int GetHashCode() |
| 102 | + { |
| 103 | + unchecked // Overflow is fine, just wrap |
| 104 | + { |
| 105 | + int hashCode = 41; |
| 106 | + if (Name != null) |
| 107 | + { |
| 108 | + hashCode = (hashCode * 59) + Name.GetHashCode(); |
| 109 | + } |
| 110 | + if (Properties != null) |
| 111 | + { |
| 112 | + hashCode = (hashCode * 59) + Properties.GetHashCode(); |
| 113 | + } |
| 114 | + hashCode = (hashCode * 59) + SyncMode.GetHashCode(); |
| 115 | + return hashCode; |
| 116 | + } |
| 117 | + } |
| 118 | + |
| 119 | +} |
| 120 | + |
0 commit comments