Skip to content

Commit 302d3b6

Browse files
feat(specs): add with transformation helpers (generated)
algolia/api-clients-automation#4931 Co-authored-by: algolia-bot <accounts+algolia-api-client-bot@algolia.com> Co-authored-by: Clément Vannicatte <vannicattec@gmail.com>
1 parent 2bf6682 commit 302d3b6

File tree

5 files changed

+131
-6
lines changed

5 files changed

+131
-6
lines changed

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ import kotlinx.serialization.json.*
99
*
1010
* @param runID Universally unique identifier (UUID) of a task run.
1111
* @param eventID Universally unique identifier (UUID) of an event.
12-
* @param `data` when used with discovering or validating sources, the sampled data of your source is returned.
13-
* @param events in case of error, observability events will be added to the response, if any.
14-
* @param message a message describing the outcome of a validate run.
12+
* @param `data` This field is always null when used with the Push endpoint. When used for a source discover or source validate run, it will include the sampled data of the source.
13+
* @param events in case of error, observability events will be added to the response.
14+
* @param message a message describing the outcome of the operation that has been ran (push, discover or validate) run.
1515
* @param createdAt Date of creation in RFC 3339 format.
1616
*/
1717
@Serializable
@@ -23,13 +23,13 @@ public data class WatchResponse(
2323
/** Universally unique identifier (UUID) of an event. */
2424
@SerialName(value = "eventID") val eventID: String? = null,
2525

26-
/** when used with discovering or validating sources, the sampled data of your source is returned. */
26+
/** This field is always null when used with the Push endpoint. When used for a source discover or source validate run, it will include the sampled data of the source. */
2727
@SerialName(value = "data") val `data`: List<JsonObject>? = null,
2828

29-
/** in case of error, observability events will be added to the response, if any. */
29+
/** in case of error, observability events will be added to the response. */
3030
@SerialName(value = "events") val events: List<Event>? = null,
3131

32-
/** a message describing the outcome of a validate run. */
32+
/** a message describing the outcome of the operation that has been ran (push, discover or validate) run. */
3333
@SerialName(value = "message") val message: String? = null,
3434

3535
/** Date of creation in RFC 3339 format. */
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
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.search
3+
4+
import kotlinx.serialization.*
5+
import kotlinx.serialization.json.*
6+
7+
/**
8+
* An event describe a step of the task execution flow..
9+
*
10+
* @param eventID Universally unique identifier (UUID) of an event.
11+
* @param runID Universally unique identifier (UUID) of a task run.
12+
* @param status
13+
* @param type
14+
* @param batchSize The extracted record batch size.
15+
* @param publishedAt Date of publish RFC 3339 format.
16+
* @param `data`
17+
*/
18+
@Serializable
19+
public data class Event(
20+
21+
/** Universally unique identifier (UUID) of an event. */
22+
@SerialName(value = "eventID") val eventID: String,
23+
24+
/** Universally unique identifier (UUID) of a task run. */
25+
@SerialName(value = "runID") val runID: String,
26+
27+
@SerialName(value = "status") val status: EventStatus,
28+
29+
@SerialName(value = "type") val type: EventType,
30+
31+
/** The extracted record batch size. */
32+
@SerialName(value = "batchSize") val batchSize: Int,
33+
34+
/** Date of publish RFC 3339 format. */
35+
@SerialName(value = "publishedAt") val publishedAt: String,
36+
37+
@SerialName(value = "data") val `data`: JsonObject? = null,
38+
)
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
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.search
3+
4+
import kotlinx.serialization.*
5+
6+
@Serializable
7+
public enum class EventStatus(public val value: kotlin.String) {
8+
9+
@SerialName(value = "created")
10+
Created("created"),
11+
12+
@SerialName(value = "started")
13+
Started("started"),
14+
15+
@SerialName(value = "retried")
16+
Retried("retried"),
17+
18+
@SerialName(value = "failed")
19+
Failed("failed"),
20+
21+
@SerialName(value = "succeeded")
22+
Succeeded("succeeded"),
23+
24+
@SerialName(value = "critical")
25+
Critical("critical");
26+
27+
override fun toString(): kotlin.String = value
28+
}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
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.search
3+
4+
import kotlinx.serialization.*
5+
6+
@Serializable
7+
public enum class EventType(public val value: kotlin.String) {
8+
9+
@SerialName(value = "fetch")
10+
Fetch("fetch"),
11+
12+
@SerialName(value = "record")
13+
Record("record"),
14+
15+
@SerialName(value = "log")
16+
Log("log"),
17+
18+
@SerialName(value = "transform")
19+
Transform("transform");
20+
21+
override fun toString(): kotlin.String = value
22+
}
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
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.search
3+
4+
import kotlinx.serialization.*
5+
import kotlinx.serialization.json.*
6+
7+
/**
8+
* WatchResponse
9+
*
10+
* @param runID Universally unique identifier (UUID) of a task run.
11+
* @param eventID Universally unique identifier (UUID) of an event.
12+
* @param `data` This field is always null when used with the Push endpoint. When used for a source discover or source validate run, it will include the sampled data of the source.
13+
* @param events in case of error, observability events will be added to the response.
14+
* @param message a message describing the outcome of the operation that has been ran (push, discover or validate) run.
15+
* @param createdAt Date of creation in RFC 3339 format.
16+
*/
17+
@Serializable
18+
public data class WatchResponse(
19+
20+
/** Universally unique identifier (UUID) of a task run. */
21+
@SerialName(value = "runID") val runID: String,
22+
23+
/** Universally unique identifier (UUID) of an event. */
24+
@SerialName(value = "eventID") val eventID: String? = null,
25+
26+
/** This field is always null when used with the Push endpoint. When used for a source discover or source validate run, it will include the sampled data of the source. */
27+
@SerialName(value = "data") val `data`: List<JsonObject>? = null,
28+
29+
/** in case of error, observability events will be added to the response. */
30+
@SerialName(value = "events") val events: List<Event>? = null,
31+
32+
/** a message describing the outcome of the operation that has been ran (push, discover or validate) run. */
33+
@SerialName(value = "message") val message: String? = null,
34+
35+
/** Date of creation in RFC 3339 format. */
36+
@SerialName(value = "createdAt") val createdAt: String? = null,
37+
)

0 commit comments

Comments
 (0)