Skip to content

Commit 7791fda

Browse files
feat(specs): update try transformation specs for no-code (#4974) (generated) [skip ci]
Co-authored-by: Mehmet Ali Gok <33124154+mehmetaligok@users.noreply.github.com>
1 parent 6031284 commit 7791fda

File tree

46 files changed

+893
-348
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+893
-348
lines changed

clients/algoliasearch-client-csharp/algoliasearch/Models/Ingestion/TransformationCreate.cs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,9 @@ public TransformationCreate() { }
3232
/// Initializes a new instance of the TransformationCreate class.
3333
/// </summary>
3434
/// <param name="name">The uniquely identified name of your transformation. (required).</param>
35-
/// <param name="type">type (required).</param>
36-
/// <param name="input">input (required).</param>
37-
public TransformationCreate(string name, TransformationType? type, TransformationInput input)
35+
public TransformationCreate(string name)
3836
{
3937
Name = name ?? throw new ArgumentNullException(nameof(name));
40-
Type = type;
41-
Input = input ?? throw new ArgumentNullException(nameof(input));
4238
}
4339

4440
/// <summary>

clients/algoliasearch-client-csharp/algoliasearch/Models/Ingestion/TransformationTry.cs

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@ namespace Algolia.Search.Models.Ingestion;
1616
/// </summary>
1717
public partial class TransformationTry
1818
{
19+
/// <summary>
20+
/// Gets or Sets Type
21+
/// </summary>
22+
[JsonPropertyName("type")]
23+
public TransformationType? Type { get; set; }
24+
1925
/// <summary>
2026
/// Initializes a new instance of the TransformationTry class.
2127
/// </summary>
@@ -25,11 +31,9 @@ public TransformationTry() { }
2531
/// <summary>
2632
/// Initializes a new instance of the TransformationTry class.
2733
/// </summary>
28-
/// <param name="code">It is deprecated. Use the `input` field with proper `type` instead to specify the transformation code. (required).</param>
2934
/// <param name="sampleRecord">The record to apply the given code to. (required).</param>
30-
public TransformationTry(string code, object sampleRecord)
35+
public TransformationTry(object sampleRecord)
3136
{
32-
Code = code ?? throw new ArgumentNullException(nameof(code));
3337
SampleRecord = sampleRecord ?? throw new ArgumentNullException(nameof(sampleRecord));
3438
}
3539

@@ -41,6 +45,12 @@ public TransformationTry(string code, object sampleRecord)
4145
[Obsolete]
4246
public string Code { get; set; }
4347

48+
/// <summary>
49+
/// Gets or Sets Input
50+
/// </summary>
51+
[JsonPropertyName("input")]
52+
public TransformationInput Input { get; set; }
53+
4454
/// <summary>
4555
/// The record to apply the given code to.
4656
/// </summary>
@@ -63,6 +73,8 @@ public override string ToString()
6373
StringBuilder sb = new StringBuilder();
6474
sb.Append("class TransformationTry {\n");
6575
sb.Append(" Code: ").Append(Code).Append("\n");
76+
sb.Append(" Type: ").Append(Type).Append("\n");
77+
sb.Append(" Input: ").Append(Input).Append("\n");
6678
sb.Append(" SampleRecord: ").Append(SampleRecord).Append("\n");
6779
sb.Append(" Authentications: ").Append(Authentications).Append("\n");
6880
sb.Append("}\n");
@@ -91,6 +103,8 @@ public override bool Equals(object obj)
91103
}
92104

93105
return (Code == input.Code || (Code != null && Code.Equals(input.Code)))
106+
&& (Type == input.Type || Type.Equals(input.Type))
107+
&& (Input == input.Input || (Input != null && Input.Equals(input.Input)))
94108
&& (
95109
SampleRecord == input.SampleRecord
96110
|| (SampleRecord != null && SampleRecord.Equals(input.SampleRecord))
@@ -116,6 +130,11 @@ public override int GetHashCode()
116130
{
117131
hashCode = (hashCode * 59) + Code.GetHashCode();
118132
}
133+
hashCode = (hashCode * 59) + Type.GetHashCode();
134+
if (Input != null)
135+
{
136+
hashCode = (hashCode * 59) + Input.GetHashCode();
137+
}
119138
if (SampleRecord != null)
120139
{
121140
hashCode = (hashCode * 59) + SampleRecord.GetHashCode();

clients/algoliasearch-client-go/algolia/ingestion/model_transformation_create.go

Lines changed: 56 additions & 26 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)