All Downloads are FREE. Search and download functionalities are using the official Maven repository.
Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
commonMain.aws.sdk.kotlin.services.glue.serde.UpdateCrawlerOperationSerializer.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.glue.serde
import aws.sdk.kotlin.services.glue.model.CrawlerTargets
import aws.sdk.kotlin.services.glue.model.LakeFormationConfiguration
import aws.sdk.kotlin.services.glue.model.LineageConfiguration
import aws.sdk.kotlin.services.glue.model.RecrawlPolicy
import aws.sdk.kotlin.services.glue.model.SchemaChangePolicy
import aws.sdk.kotlin.services.glue.model.UpdateCrawlerRequest
import aws.smithy.kotlin.runtime.http.HttpBody
import aws.smithy.kotlin.runtime.http.HttpMethod
import aws.smithy.kotlin.runtime.http.operation.HttpSerializer
import aws.smithy.kotlin.runtime.http.request.HttpRequestBuilder
import aws.smithy.kotlin.runtime.http.request.url
import aws.smithy.kotlin.runtime.operation.ExecutionContext
import aws.smithy.kotlin.runtime.serde.SdkFieldDescriptor
import aws.smithy.kotlin.runtime.serde.SdkObjectDescriptor
import aws.smithy.kotlin.runtime.serde.SerialKind
import aws.smithy.kotlin.runtime.serde.asSdkSerializable
import aws.smithy.kotlin.runtime.serde.deserializeList
import aws.smithy.kotlin.runtime.serde.deserializeMap
import aws.smithy.kotlin.runtime.serde.deserializeStruct
import aws.smithy.kotlin.runtime.serde.field
import aws.smithy.kotlin.runtime.serde.json.JsonDeserializer
import aws.smithy.kotlin.runtime.serde.json.JsonSerialName
import aws.smithy.kotlin.runtime.serde.json.JsonSerializer
import aws.smithy.kotlin.runtime.serde.serializeList
import aws.smithy.kotlin.runtime.serde.serializeMap
import aws.smithy.kotlin.runtime.serde.serializeStruct
internal class UpdateCrawlerOperationSerializer: HttpSerializer.NonStreaming {
override fun serialize(context: ExecutionContext, input: UpdateCrawlerRequest): HttpRequestBuilder {
val builder = HttpRequestBuilder()
builder.method = HttpMethod.POST
builder.url {
path.encoded = "/"
}
val payload = serializeUpdateCrawlerOperationBody(context, input)
builder.body = HttpBody.fromBytes(payload)
if (builder.body !is HttpBody.Empty) {
builder.headers.setMissing("Content-Type", "application/x-amz-json-1.1")
}
return builder
}
}
private fun serializeUpdateCrawlerOperationBody(context: ExecutionContext, input: UpdateCrawlerRequest): ByteArray {
val serializer = JsonSerializer()
val CLASSIFIERS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.List, JsonSerialName("Classifiers"))
val CONFIGURATION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("Configuration"))
val CRAWLERSECURITYCONFIGURATION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("CrawlerSecurityConfiguration"))
val DATABASENAME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("DatabaseName"))
val DESCRIPTION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("Description"))
val LAKEFORMATIONCONFIGURATION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("LakeFormationConfiguration"))
val LINEAGECONFIGURATION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("LineageConfiguration"))
val NAME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("Name"))
val RECRAWLPOLICY_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("RecrawlPolicy"))
val ROLE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("Role"))
val SCHEDULE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("Schedule"))
val SCHEMACHANGEPOLICY_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("SchemaChangePolicy"))
val TABLEPREFIX_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("TablePrefix"))
val TARGETS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("Targets"))
val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
field(CLASSIFIERS_DESCRIPTOR)
field(CONFIGURATION_DESCRIPTOR)
field(CRAWLERSECURITYCONFIGURATION_DESCRIPTOR)
field(DATABASENAME_DESCRIPTOR)
field(DESCRIPTION_DESCRIPTOR)
field(LAKEFORMATIONCONFIGURATION_DESCRIPTOR)
field(LINEAGECONFIGURATION_DESCRIPTOR)
field(NAME_DESCRIPTOR)
field(RECRAWLPOLICY_DESCRIPTOR)
field(ROLE_DESCRIPTOR)
field(SCHEDULE_DESCRIPTOR)
field(SCHEMACHANGEPOLICY_DESCRIPTOR)
field(TABLEPREFIX_DESCRIPTOR)
field(TARGETS_DESCRIPTOR)
}
serializer.serializeStruct(OBJ_DESCRIPTOR) {
if (input.classifiers != null) {
listField(CLASSIFIERS_DESCRIPTOR) {
for (el0 in input.classifiers) {
serializeString(el0)
}
}
}
input.configuration?.let { field(CONFIGURATION_DESCRIPTOR, it) }
input.crawlerSecurityConfiguration?.let { field(CRAWLERSECURITYCONFIGURATION_DESCRIPTOR, it) }
input.databaseName?.let { field(DATABASENAME_DESCRIPTOR, it) }
input.description?.let { field(DESCRIPTION_DESCRIPTOR, it) }
input.lakeFormationConfiguration?.let { field(LAKEFORMATIONCONFIGURATION_DESCRIPTOR, it, ::serializeLakeFormationConfigurationDocument) }
input.lineageConfiguration?.let { field(LINEAGECONFIGURATION_DESCRIPTOR, it, ::serializeLineageConfigurationDocument) }
input.name?.let { field(NAME_DESCRIPTOR, it) }
input.recrawlPolicy?.let { field(RECRAWLPOLICY_DESCRIPTOR, it, ::serializeRecrawlPolicyDocument) }
input.role?.let { field(ROLE_DESCRIPTOR, it) }
input.schedule?.let { field(SCHEDULE_DESCRIPTOR, it) }
input.schemaChangePolicy?.let { field(SCHEMACHANGEPOLICY_DESCRIPTOR, it, ::serializeSchemaChangePolicyDocument) }
input.tablePrefix?.let { field(TABLEPREFIX_DESCRIPTOR, it) }
input.targets?.let { field(TARGETS_DESCRIPTOR, it, ::serializeCrawlerTargetsDocument) }
}
return serializer.toByteArray()
}