Skip to content

Commit a4bbedc

Browse files
algolia-botmillotp
andcommitted
feat(specs): only use shortname in the source input [skip-bc] (generated)
algolia/api-clients-automation#4287 Co-authored-by: algolia-bot <[email protected]> Co-authored-by: Pierre Millot <[email protected]>
1 parent 771368c commit a4bbedc

File tree

5 files changed

+8
-67
lines changed

5 files changed

+8
-67
lines changed

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

Lines changed: 0 additions & 19 deletions
This file was deleted.

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

Lines changed: 0 additions & 19 deletions
This file was deleted.

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

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,25 +7,15 @@ import kotlinx.serialization.json.*
77
/**
88
* SourceDocker
99
*
10-
* @param imageType
11-
* @param registry
12-
* @param image Docker image name.
10+
* @param image Shortname of the image, as returned by the referential.
1311
* @param configuration Configuration of the spec.
14-
* @param version Docker image version.
1512
*/
1613
@Serializable
1714
public data class SourceDocker(
1815

19-
@SerialName(value = "imageType") val imageType: DockerImageType,
20-
21-
@SerialName(value = "registry") val registry: DockerRegistry,
22-
23-
/** Docker image name. */
16+
/** Shortname of the image, as returned by the referential. */
2417
@SerialName(value = "image") val image: String,
2518

2619
/** Configuration of the spec. */
2720
@SerialName(value = "configuration") val configuration: JsonObject,
28-
29-
/** Docker image version. */
30-
@SerialName(value = "version") val version: String? = null,
3121
) : SourceInput

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@ import kotlin.jvm.JvmInline
2727
public sealed interface SourceInput {
2828
@Serializable
2929
@JvmInline
30-
public value class SourceDockerValue(public val value: SourceDocker) : SourceInput
30+
public value class SourceGA4BigQueryExportValue(public val value: SourceGA4BigQueryExport) : SourceInput
3131

3232
@Serializable
3333
@JvmInline
34-
public value class SourceGA4BigQueryExportValue(public val value: SourceGA4BigQueryExport) : SourceInput
34+
public value class SourceDockerValue(public val value: SourceDocker) : SourceInput
3535

3636
@Serializable
3737
@JvmInline
@@ -59,12 +59,12 @@ public sealed interface SourceInput {
5959

6060
public companion object {
6161

62-
public fun of(value: SourceDocker): SourceInput {
63-
return SourceDockerValue(value)
64-
}
6562
public fun of(value: SourceGA4BigQueryExport): SourceInput {
6663
return SourceGA4BigQueryExportValue(value)
6764
}
65+
public fun of(value: SourceDocker): SourceInput {
66+
return SourceDockerValue(value)
67+
}
6868
public fun of(value: SourceCommercetools): SourceInput {
6969
return SourceCommercetoolsValue(value)
7070
}
@@ -89,8 +89,8 @@ public sealed interface SourceInput {
8989
internal class SourceInputSerializer : JsonContentPolymorphicSerializer<SourceInput>(SourceInput::class) {
9090
override fun selectDeserializer(element: JsonElement): DeserializationStrategy<SourceInput> {
9191
return when {
92-
element is JsonObject && element.containsKey("registry") && element.containsKey("image") && element.containsKey("imageType") && element.containsKey("configuration") -> SourceDocker.serializer()
9392
element is JsonObject && element.containsKey("projectID") && element.containsKey("datasetID") && element.containsKey("tablePrefix") -> SourceGA4BigQueryExport.serializer()
93+
element is JsonObject && element.containsKey("image") && element.containsKey("configuration") -> SourceDocker.serializer()
9494
element is JsonObject && element.containsKey("projectKey") -> SourceCommercetools.serializer()
9595
element is JsonObject && element.containsKey("storeHash") -> SourceBigCommerce.serializer()
9696
element is JsonObject && element.containsKey("projectID") -> SourceBigQuery.serializer()

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

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,21 +8,10 @@ import kotlinx.serialization.json.*
88
* SourceUpdateDocker
99
*
1010
* @param configuration Configuration of the spec.
11-
* @param registry
12-
* @param image Docker image name.
13-
* @param version Docker image version.
1411
*/
1512
@Serializable
1613
public data class SourceUpdateDocker(
1714

1815
/** Configuration of the spec. */
1916
@SerialName(value = "configuration") val configuration: JsonObject,
20-
21-
@SerialName(value = "registry") val registry: DockerRegistry? = null,
22-
23-
/** Docker image name. */
24-
@SerialName(value = "image") val image: String? = null,
25-
26-
/** Docker image version. */
27-
@SerialName(value = "version") val version: String? = null,
2817
) : SourceUpdateInput

0 commit comments

Comments
 (0)