Skip to content

Commit ca498ec

Browse files
algolia-botsbellone
andcommitted
fix(specs): Ingestion API - update destination payload (generated)
algolia/api-clients-automation#6320 Co-authored-by: algolia-bot <accounts+algolia-api-client-bot@algolia.com> Co-authored-by: Sylvain Bellone <sylvain.bellone@algolia.com>
1 parent 1d50a37 commit ca498ec

2 files changed

Lines changed: 115 additions & 11 deletions

File tree

algoliasearch/Models/Ingestion/DestinationUpdate.cs

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,6 @@ namespace Algolia.Search.Models.Ingestion;
1616
/// </summary>
1717
public partial class DestinationUpdate
1818
{
19-
/// <summary>
20-
/// Gets or Sets Type
21-
/// </summary>
22-
[JsonPropertyName("type")]
23-
public DestinationType? Type { get; set; }
24-
2519
/// <summary>
2620
/// Initializes a new instance of the DestinationUpdate class.
2721
/// </summary>
@@ -38,7 +32,7 @@ public DestinationUpdate() { }
3832
/// Gets or Sets Input
3933
/// </summary>
4034
[JsonPropertyName("input")]
41-
public DestinationInput Input { get; set; }
35+
public DestinationUpdateInput Input { get; set; }
4236

4337
/// <summary>
4438
/// Universally unique identifier (UUID) of an authentication resource.
@@ -61,7 +55,6 @@ public override string ToString()
6155
{
6256
StringBuilder sb = new StringBuilder();
6357
sb.Append("class DestinationUpdate {\n");
64-
sb.Append(" Type: ").Append(Type).Append("\n");
6558
sb.Append(" Name: ").Append(Name).Append("\n");
6659
sb.Append(" Input: ").Append(Input).Append("\n");
6760
sb.Append(" AuthenticationID: ").Append(AuthenticationID).Append("\n");
@@ -91,8 +84,7 @@ public override bool Equals(object obj)
9184
return false;
9285
}
9386

94-
return (Type == input.Type || Type.Equals(input.Type))
95-
&& (Name == input.Name || (Name != null && Name.Equals(input.Name)))
87+
return (Name == input.Name || (Name != null && Name.Equals(input.Name)))
9688
&& (Input == input.Input || (Input != null && Input.Equals(input.Input)))
9789
&& (
9890
AuthenticationID == input.AuthenticationID
@@ -115,7 +107,6 @@ public override int GetHashCode()
115107
unchecked // Overflow is fine, just wrap
116108
{
117109
int hashCode = 41;
118-
hashCode = (hashCode * 59) + Type.GetHashCode();
119110
if (Name != null)
120111
{
121112
hashCode = (hashCode * 59) + Name.GetHashCode();
Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
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

Comments
 (0)