|
| 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.Ingestion; |
| 13 | + |
| 14 | +/// <summary> |
| 15 | +/// DestinationUpdateInput |
| 16 | +/// </summary> |
| 17 | +public partial class DestinationUpdateInput |
| 18 | +{ |
| 19 | + /// <summary> |
| 20 | + /// Gets or Sets RecordType |
| 21 | + /// </summary> |
| 22 | + [JsonPropertyName("recordType")] |
| 23 | + public RecordType? RecordType { get; set; } |
| 24 | + |
| 25 | + /// <summary> |
| 26 | + /// Initializes a new instance of the DestinationUpdateInput class. |
| 27 | + /// </summary> |
| 28 | + public DestinationUpdateInput() { } |
| 29 | + |
| 30 | + /// <summary> |
| 31 | + /// Algolia index name (case-sensitive). |
| 32 | + /// </summary> |
| 33 | + /// <value>Algolia index name (case-sensitive).</value> |
| 34 | + [JsonPropertyName("indexName")] |
| 35 | + public string IndexName { get; set; } |
| 36 | + |
| 37 | + /// <summary> |
| 38 | + /// Attributes from your source to exclude from Algolia records. Not all your data attributes will be useful for searching. Keeping your Algolia records small increases indexing and search performance. - Exclude nested attributes with `.` notation. For example, `foo.bar` indexes the `foo` attribute and all its children **except** the `bar` attribute. - Exclude attributes from arrays with `[i]`, where `i` is the index of the array element. For example, `foo.[0].bar` only excludes the `bar` attribute from the first element of the `foo` array, but indexes the complete `foo` attribute for all other elements. Use `*` as wildcard: `foo.[*].bar` excludes `bar` from all elements of the `foo` array. |
| 39 | + /// </summary> |
| 40 | + /// <value>Attributes from your source to exclude from Algolia records. Not all your data attributes will be useful for searching. Keeping your Algolia records small increases indexing and search performance. - Exclude nested attributes with `.` notation. For example, `foo.bar` indexes the `foo` attribute and all its children **except** the `bar` attribute. - Exclude attributes from arrays with `[i]`, where `i` is the index of the array element. For example, `foo.[0].bar` only excludes the `bar` attribute from the first element of the `foo` array, but indexes the complete `foo` attribute for all other elements. Use `*` as wildcard: `foo.[*].bar` excludes `bar` from all elements of the `foo` array. </value> |
| 41 | + [JsonPropertyName("attributesToExclude")] |
| 42 | + public List<string> AttributesToExclude { get; set; } |
| 43 | + |
| 44 | + /// <summary> |
| 45 | + /// Returns the string presentation of the object |
| 46 | + /// </summary> |
| 47 | + /// <returns>String presentation of the object</returns> |
| 48 | + public override string ToString() |
| 49 | + { |
| 50 | + StringBuilder sb = new StringBuilder(); |
| 51 | + sb.Append("class DestinationUpdateInput {\n"); |
| 52 | + sb.Append(" IndexName: ").Append(IndexName).Append("\n"); |
| 53 | + sb.Append(" RecordType: ").Append(RecordType).Append("\n"); |
| 54 | + sb.Append(" AttributesToExclude: ").Append(AttributesToExclude).Append("\n"); |
| 55 | + sb.Append("}\n"); |
| 56 | + return sb.ToString(); |
| 57 | + } |
| 58 | + |
| 59 | + /// <summary> |
| 60 | + /// Returns the JSON string presentation of the object |
| 61 | + /// </summary> |
| 62 | + /// <returns>JSON string presentation of the object</returns> |
| 63 | + public virtual string ToJson() |
| 64 | + { |
| 65 | + return JsonSerializer.Serialize(this, JsonConfig.Options); |
| 66 | + } |
| 67 | + |
| 68 | + /// <summary> |
| 69 | + /// Returns true if objects are equal |
| 70 | + /// </summary> |
| 71 | + /// <param name="obj">Object to be compared</param> |
| 72 | + /// <returns>Boolean</returns> |
| 73 | + public override bool Equals(object obj) |
| 74 | + { |
| 75 | + if (obj is not DestinationUpdateInput input) |
| 76 | + { |
| 77 | + return false; |
| 78 | + } |
| 79 | + |
| 80 | + return ( |
| 81 | + IndexName == input.IndexName || (IndexName != null && IndexName.Equals(input.IndexName)) |
| 82 | + ) |
| 83 | + && (RecordType == input.RecordType || RecordType.Equals(input.RecordType)) |
| 84 | + && ( |
| 85 | + AttributesToExclude == input.AttributesToExclude |
| 86 | + || AttributesToExclude != null |
| 87 | + && input.AttributesToExclude != null |
| 88 | + && AttributesToExclude.SequenceEqual(input.AttributesToExclude) |
| 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 | + if (IndexName != null) |
| 102 | + { |
| 103 | + hashCode = (hashCode * 59) + IndexName.GetHashCode(); |
| 104 | + } |
| 105 | + hashCode = (hashCode * 59) + RecordType.GetHashCode(); |
| 106 | + if (AttributesToExclude != null) |
| 107 | + { |
| 108 | + hashCode = (hashCode * 59) + AttributesToExclude.GetHashCode(); |
| 109 | + } |
| 110 | + return hashCode; |
| 111 | + } |
| 112 | + } |
| 113 | +} |
0 commit comments