Skip to content

Commit a1a1281

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

File tree

8 files changed

+924
-11
lines changed

8 files changed

+924
-11
lines changed

lib/Api/IngestionClient.php

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -350,8 +350,10 @@ public function createTaskV1($taskCreate, $requestOptions = [])
350350
* Creates a new transformation.
351351
*
352352
* @param array|TransformationCreate $transformationCreate Request body for creating a transformation. (required)
353-
* - $transformationCreate['code'] => (string) The source code of the transformation. (required)
353+
* - $transformationCreate['code'] => (string) It is deprecated. Use the `input` field with proper `type` instead to specify the transformation code.
354354
* - $transformationCreate['name'] => (string) The uniquely identified name of your transformation. (required)
355+
* - $transformationCreate['type'] => (array) (required)
356+
* - $transformationCreate['input'] => (array) (required)
355357
* - $transformationCreate['description'] => (string) A descriptive name for your transformation of what it does.
356358
* - $transformationCreate['authenticationIDs'] => (array) The authentications associated with the current transformation.
357359
*
@@ -2313,7 +2315,7 @@ public function triggerDockerSourceDiscover($sourceID, $requestOptions = [])
23132315
* - editSettings
23142316
*
23152317
* @param array|TransformationTry $transformationTry transformationTry (required)
2316-
* - $transformationTry['code'] => (string) The source code of the transformation. (required)
2318+
* - $transformationTry['code'] => (string) It is deprecated. Use the `input` field with proper `type` instead to specify the transformation code. (required)
23172319
* - $transformationTry['sampleRecord'] => (array) The record to apply the given code to. (required)
23182320
* - $transformationTry['authentications'] => (array)
23192321
*
@@ -2350,7 +2352,7 @@ public function tryTransformation($transformationTry, $requestOptions = [])
23502352
*
23512353
* @param string $transformationID Unique identifier of a transformation. (required)
23522354
* @param array|TransformationTry $transformationTry transformationTry (required)
2353-
* - $transformationTry['code'] => (string) The source code of the transformation. (required)
2355+
* - $transformationTry['code'] => (string) It is deprecated. Use the `input` field with proper `type` instead to specify the transformation code. (required)
23542356
* - $transformationTry['sampleRecord'] => (array) The record to apply the given code to. (required)
23552357
* - $transformationTry['authentications'] => (array)
23562358
*
@@ -2659,8 +2661,10 @@ public function updateTaskV1($taskID, $taskUpdate, $requestOptions = [])
26592661
*
26602662
* @param string $transformationID Unique identifier of a transformation. (required)
26612663
* @param array|TransformationCreate $transformationCreate transformationCreate (required)
2662-
* - $transformationCreate['code'] => (string) The source code of the transformation. (required)
2664+
* - $transformationCreate['code'] => (string) It is deprecated. Use the `input` field with proper `type` instead to specify the transformation code.
26632665
* - $transformationCreate['name'] => (string) The uniquely identified name of your transformation. (required)
2666+
* - $transformationCreate['type'] => (array) (required)
2667+
* - $transformationCreate['input'] => (array) (required)
26642668
* - $transformationCreate['description'] => (string) A descriptive name for your transformation of what it does.
26652669
* - $transformationCreate['authenticationIDs'] => (array) The authentications associated with the current transformation.
26662670
*

lib/Model/Ingestion/Transformation.php

Lines changed: 69 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ class Transformation extends AbstractModel implements ModelInterface, \ArrayAcce
2323
'transformationID' => 'string',
2424
'authenticationIDs' => 'string[]',
2525
'code' => 'string',
26+
'type' => '\Algolia\AlgoliaSearch\Model\Ingestion\TransformationType',
27+
'input' => '\Algolia\AlgoliaSearch\Model\Ingestion\TransformationInput',
2628
'name' => 'string',
2729
'description' => 'string',
2830
'owner' => 'string',
@@ -39,6 +41,8 @@ class Transformation extends AbstractModel implements ModelInterface, \ArrayAcce
3941
'transformationID' => null,
4042
'authenticationIDs' => null,
4143
'code' => null,
44+
'type' => null,
45+
'input' => null,
4246
'name' => null,
4347
'description' => null,
4448
'owner' => null,
@@ -56,6 +60,8 @@ class Transformation extends AbstractModel implements ModelInterface, \ArrayAcce
5660
'transformationID' => 'transformationID',
5761
'authenticationIDs' => 'authenticationIDs',
5862
'code' => 'code',
63+
'type' => 'type',
64+
'input' => 'input',
5965
'name' => 'name',
6066
'description' => 'description',
6167
'owner' => 'owner',
@@ -72,6 +78,8 @@ class Transformation extends AbstractModel implements ModelInterface, \ArrayAcce
7278
'transformationID' => 'setTransformationID',
7379
'authenticationIDs' => 'setAuthenticationIDs',
7480
'code' => 'setCode',
81+
'type' => 'setType',
82+
'input' => 'setInput',
7583
'name' => 'setName',
7684
'description' => 'setDescription',
7785
'owner' => 'setOwner',
@@ -88,6 +96,8 @@ class Transformation extends AbstractModel implements ModelInterface, \ArrayAcce
8896
'transformationID' => 'getTransformationID',
8997
'authenticationIDs' => 'getAuthenticationIDs',
9098
'code' => 'getCode',
99+
'type' => 'getType',
100+
'input' => 'getInput',
91101
'name' => 'getName',
92102
'description' => 'getDescription',
93103
'owner' => 'getOwner',
@@ -118,6 +128,12 @@ public function __construct(?array $data = null)
118128
if (isset($data['code'])) {
119129
$this->container['code'] = $data['code'];
120130
}
131+
if (isset($data['type'])) {
132+
$this->container['type'] = $data['type'];
133+
}
134+
if (isset($data['input'])) {
135+
$this->container['input'] = $data['input'];
136+
}
121137
if (isset($data['name'])) {
122138
$this->container['name'] = $data['name'];
123139
}
@@ -277,6 +293,8 @@ public function setAuthenticationIDs($authenticationIDs)
277293
* Gets code.
278294
*
279295
* @return string
296+
*
297+
* @deprecated
280298
*/
281299
public function getCode()
282300
{
@@ -286,9 +304,11 @@ public function getCode()
286304
/**
287305
* Sets code.
288306
*
289-
* @param string $code the source code of the transformation
307+
* @param string $code It is deprecated. Use the `input` field with proper `type` instead to specify the transformation code.
290308
*
291309
* @return self
310+
*
311+
* @deprecated
292312
*/
293313
public function setCode($code)
294314
{
@@ -297,6 +317,54 @@ public function setCode($code)
297317
return $this;
298318
}
299319

320+
/**
321+
* Gets type.
322+
*
323+
* @return null|TransformationType
324+
*/
325+
public function getType()
326+
{
327+
return $this->container['type'] ?? null;
328+
}
329+
330+
/**
331+
* Sets type.
332+
*
333+
* @param null|TransformationType $type type
334+
*
335+
* @return self
336+
*/
337+
public function setType($type)
338+
{
339+
$this->container['type'] = $type;
340+
341+
return $this;
342+
}
343+
344+
/**
345+
* Gets input.
346+
*
347+
* @return null|TransformationInput
348+
*/
349+
public function getInput()
350+
{
351+
return $this->container['input'] ?? null;
352+
}
353+
354+
/**
355+
* Sets input.
356+
*
357+
* @param null|TransformationInput $input input
358+
*
359+
* @return self
360+
*/
361+
public function setInput($input)
362+
{
363+
$this->container['input'] = $input;
364+
365+
return $this;
366+
}
367+
300368
/**
301369
* Gets name.
302370
*

0 commit comments

Comments
 (0)