Skip to content

Commit 02e8f0a

Browse files
feat(specs): document runMetadata parameter (generated)
algolia/api-clients-automation#5087 Co-authored-by: algolia-bot <[email protected]> Co-authored-by: Devin Beeuwkes <[email protected]>
1 parent cf50ff3 commit 02e8f0a

File tree

3 files changed

+27
-2
lines changed

3 files changed

+27
-2
lines changed

client/src/commonMain/kotlin/com/algolia/client/api/IngestionClient.kt

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1019,13 +1019,15 @@ public class IngestionClient(
10191019
* - deleteIndex
10201020
* - editSettings
10211021
* @param taskID Unique identifier of a task.
1022+
* @param runTaskPayload
10221023
* @param requestOptions additional request configuration.
10231024
*/
1024-
public suspend fun runTask(taskID: String, requestOptions: RequestOptions? = null): RunResponse {
1025+
public suspend fun runTask(taskID: String, runTaskPayload: RunTaskPayload? = null, requestOptions: RequestOptions? = null): RunResponse {
10251026
require(taskID.isNotBlank()) { "Parameter `taskID` is required when calling `runTask`." }
10261027
val requestConfig = RequestConfig(
10271028
method = RequestMethod.POST,
10281029
path = listOf("2", "tasks", "$taskID", "run"),
1030+
body = runTaskPayload,
10291031
)
10301032
return requester.execute(
10311033
requestConfig = requestConfig,
@@ -1042,13 +1044,15 @@ public class IngestionClient(
10421044
* - editSettings
10431045
* @deprecated
10441046
* @param taskID Unique identifier of a task.
1047+
* @param runTaskPayload
10451048
* @param requestOptions additional request configuration.
10461049
*/
1047-
public suspend fun runTaskV1(taskID: String, requestOptions: RequestOptions? = null): RunResponse {
1050+
public suspend fun runTaskV1(taskID: String, runTaskPayload: RunTaskPayload? = null, requestOptions: RequestOptions? = null): RunResponse {
10481051
require(taskID.isNotBlank()) { "Parameter `taskID` is required when calling `runTaskV1`." }
10491052
val requestConfig = RequestConfig(
10501053
method = RequestMethod.POST,
10511054
path = listOf("1", "tasks", "$taskID", "run"),
1055+
body = runTaskPayload,
10521056
)
10531057
return requester.execute(
10541058
requestConfig = requestConfig,

client/src/commonMain/kotlin/com/algolia/client/model/ingestion/RunSourcePayload.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import kotlinx.serialization.json.*
1111
* @param indexToExclude List of index names to exclude in reindex/update.
1212
* @param entityIDs List of entityIDs to update.
1313
* @param entityType
14+
* @param runMetadata Additional information that will be passed to the created runs.
1415
*/
1516
@Serializable
1617
public data class RunSourcePayload(
@@ -25,4 +26,7 @@ public data class RunSourcePayload(
2526
@SerialName(value = "entityIDs") val entityIDs: List<String>? = null,
2627

2728
@SerialName(value = "entityType") val entityType: EntityType? = null,
29+
30+
/** Additional information that will be passed to the created runs. */
31+
@SerialName(value = "runMetadata") val runMetadata: JsonObject? = null,
2832
)
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
/** 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. */
2+
package com.algolia.client.model.ingestion
3+
4+
import kotlinx.serialization.*
5+
import kotlinx.serialization.json.*
6+
7+
/**
8+
* RunTaskPayload
9+
*
10+
* @param runMetadata Additional information that will be passed to the created run.
11+
*/
12+
@Serializable
13+
public data class RunTaskPayload(
14+
15+
/** Additional information that will be passed to the created run. */
16+
@SerialName(value = "runMetadata") val runMetadata: JsonObject? = null,
17+
)

0 commit comments

Comments
 (0)