Skip to content

Commit 767ca91

Browse files
feat(specs): update try transformation specs for no-code (generated)
algolia/api-clients-automation#4974 Co-authored-by: algolia-bot <[email protected]> Co-authored-by: Mehmet Ali Gok <[email protected]>
1 parent d977e9b commit 767ca91

File tree

2 files changed

+19
-7
lines changed

2 files changed

+19
-7
lines changed

lib/algolia/models/ingestion/transformation_create.rb

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,14 +91,10 @@ def initialize(attributes = {})
9191

9292
if attributes.key?(:type)
9393
self.type = attributes[:type]
94-
else
95-
self.type = nil
9694
end
9795

9896
if attributes.key?(:input)
9997
self.input = attributes[:input]
100-
else
101-
self.input = nil
10298
end
10399

104100
if attributes.key?(:description)

lib/algolia/models/ingestion/transformation_try.rb

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ class TransformationTry
1111
# It is deprecated. Use the `input` field with proper `type` instead to specify the transformation code.
1212
attr_accessor :code
1313

14+
attr_accessor :type
15+
16+
attr_accessor :input
17+
1418
# The record to apply the given code to.
1519
attr_accessor :sample_record
1620

@@ -20,6 +24,8 @@ class TransformationTry
2024
def self.attribute_map
2125
{
2226
:code => :code,
27+
:type => :type,
28+
:input => :input,
2329
:sample_record => :sampleRecord,
2430
:authentications => :authentications
2531
}
@@ -29,6 +35,8 @@ def self.attribute_map
2935
def self.types_mapping
3036
{
3137
:code => :"String",
38+
:type => :"TransformationType",
39+
:input => :"TransformationInput",
3240
:sample_record => :"Object",
3341
:authentications => :"Array<AuthenticationCreate>"
3442
}
@@ -66,8 +74,14 @@ def initialize(attributes = {})
6674

6775
if attributes.key?(:code)
6876
self.code = attributes[:code]
69-
else
70-
self.code = nil
77+
end
78+
79+
if attributes.key?(:type)
80+
self.type = attributes[:type]
81+
end
82+
83+
if attributes.key?(:input)
84+
self.input = attributes[:input]
7185
end
7286

7387
if attributes.key?(:sample_record)
@@ -89,6 +103,8 @@ def ==(other)
89103
return true if self.equal?(other)
90104
self.class == other.class &&
91105
code == other.code &&
106+
type == other.type &&
107+
input == other.input &&
92108
sample_record == other.sample_record &&
93109
authentications == other.authentications
94110
end
@@ -102,7 +118,7 @@ def eql?(other)
102118
# Calculates hash code according to all attributes.
103119
# @return [Integer] Hash code
104120
def hash
105-
[code, sample_record, authentications].hash
121+
[code, type, input, sample_record, authentications].hash
106122
end
107123

108124
# Builds the object from hash

0 commit comments

Comments
 (0)