-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(specs): ingestion push task payload [skip-bc] (generated)
algolia/api-clients-automation#3607 Co-authored-by: algolia-bot <[email protected]> Co-authored-by: Clément Vannicatte <[email protected]> Co-authored-by: Pierre Millot <[email protected]>
- Loading branch information
1 parent
70fb5ba
commit 506dd0b
Showing
4 changed files
with
54 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 0 additions & 16 deletions
16
client/src/commonMain/kotlin/com/algolia/client/model/ingestion/BatchWriteParams.kt
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47 changes: 47 additions & 0 deletions
47
client/src/commonMain/kotlin/com/algolia/client/model/ingestion/PushTaskRecords.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
/** 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. */ | ||
package com.algolia.client.model.ingestion | ||
|
||
import com.algolia.client.extensions.internal.* | ||
import kotlinx.serialization.* | ||
import kotlinx.serialization.descriptors.* | ||
import kotlinx.serialization.encoding.* | ||
import kotlinx.serialization.json.* | ||
|
||
/** | ||
* PushTaskRecords | ||
* | ||
* @param objectID Unique record identifier. | ||
*/ | ||
@Serializable(PushTaskRecordsSerializer::class) | ||
public data class PushTaskRecords( | ||
|
||
/** Unique record identifier. */ | ||
val objectID: String, | ||
|
||
val additionalProperties: Map<String, JsonElement>? = null, | ||
) | ||
|
||
internal object PushTaskRecordsSerializer : KSerializer<PushTaskRecords> { | ||
|
||
override val descriptor: SerialDescriptor = buildClassSerialDescriptor("PushTaskRecords") { | ||
element<String>("objectID") | ||
} | ||
|
||
override fun deserialize(decoder: Decoder): PushTaskRecords { | ||
val input = decoder.asJsonDecoder() | ||
val tree = input.decodeJsonObject() | ||
return PushTaskRecords( | ||
objectID = tree.getValue("objectID").let { input.json.decodeFromJsonElement(it) }, | ||
additionalProperties = tree.filterKeys { it !in descriptor.elementNames }, | ||
) | ||
} | ||
|
||
override fun serialize(encoder: Encoder, value: PushTaskRecords) { | ||
val output = encoder.asJsonEncoder() | ||
val json = buildJsonObject { | ||
put("objectID", output.json.encodeToJsonElement(value.objectID)) | ||
value.additionalProperties?.onEach { (key, element) -> put(key, element) } | ||
} | ||
(encoder as JsonEncoder).encodeJsonElement(json) | ||
} | ||
} |