@@ -16,6 +16,12 @@ namespace Algolia.Search.Models.Ingestion;
16
16
/// </summary>
17
17
public partial class TransformationTry
18
18
{
19
+ /// <summary>
20
+ /// Gets or Sets Type
21
+ /// </summary>
22
+ [ JsonPropertyName ( "type" ) ]
23
+ public TransformationType ? Type { get ; set ; }
24
+
19
25
/// <summary>
20
26
/// Initializes a new instance of the TransformationTry class.
21
27
/// </summary>
@@ -25,11 +31,9 @@ public TransformationTry() { }
25
31
/// <summary>
26
32
/// Initializes a new instance of the TransformationTry class.
27
33
/// </summary>
28
- /// <param name="code">It is deprecated. Use the `input` field with proper `type` instead to specify the transformation code. (required).</param>
29
34
/// <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 )
31
36
{
32
- Code = code ?? throw new ArgumentNullException ( nameof ( code ) ) ;
33
37
SampleRecord = sampleRecord ?? throw new ArgumentNullException ( nameof ( sampleRecord ) ) ;
34
38
}
35
39
@@ -41,6 +45,12 @@ public TransformationTry(string code, object sampleRecord)
41
45
[ Obsolete ]
42
46
public string Code { get ; set ; }
43
47
48
+ /// <summary>
49
+ /// Gets or Sets Input
50
+ /// </summary>
51
+ [ JsonPropertyName ( "input" ) ]
52
+ public TransformationInput Input { get ; set ; }
53
+
44
54
/// <summary>
45
55
/// The record to apply the given code to.
46
56
/// </summary>
@@ -63,6 +73,8 @@ public override string ToString()
63
73
StringBuilder sb = new StringBuilder ( ) ;
64
74
sb . Append ( "class TransformationTry {\n " ) ;
65
75
sb . Append ( " Code: " ) . Append ( Code ) . Append ( "\n " ) ;
76
+ sb . Append ( " Type: " ) . Append ( Type ) . Append ( "\n " ) ;
77
+ sb . Append ( " Input: " ) . Append ( Input ) . Append ( "\n " ) ;
66
78
sb . Append ( " SampleRecord: " ) . Append ( SampleRecord ) . Append ( "\n " ) ;
67
79
sb . Append ( " Authentications: " ) . Append ( Authentications ) . Append ( "\n " ) ;
68
80
sb . Append ( "}\n " ) ;
@@ -91,6 +103,8 @@ public override bool Equals(object obj)
91
103
}
92
104
93
105
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 ) ) )
94
108
&& (
95
109
SampleRecord == input . SampleRecord
96
110
|| ( SampleRecord != null && SampleRecord . Equals ( input . SampleRecord ) )
@@ -116,6 +130,11 @@ public override int GetHashCode()
116
130
{
117
131
hashCode = ( hashCode * 59 ) + Code . GetHashCode ( ) ;
118
132
}
133
+ hashCode = ( hashCode * 59 ) + Type . GetHashCode ( ) ;
134
+ if ( Input != null )
135
+ {
136
+ hashCode = ( hashCode * 59 ) + Input . GetHashCode ( ) ;
137
+ }
119
138
if ( SampleRecord != null )
120
139
{
121
140
hashCode = ( hashCode * 59 ) + SampleRecord . GetHashCode ( ) ;
0 commit comments