commonMain.aws.sdk.kotlin.services.databasemigrationservice.serde.ModifyEndpointOperationSerializer.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of databasemigrationservice-jvm Show documentation
Show all versions of databasemigrationservice-jvm Show documentation
The AWS SDK for Kotlin client for Database Migration Service
The newest version!
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.databasemigrationservice.serde
import aws.sdk.kotlin.services.databasemigrationservice.model.DmsSslModeValue
import aws.sdk.kotlin.services.databasemigrationservice.model.DmsTransferSettings
import aws.sdk.kotlin.services.databasemigrationservice.model.DocDbSettings
import aws.sdk.kotlin.services.databasemigrationservice.model.DynamoDbSettings
import aws.sdk.kotlin.services.databasemigrationservice.model.ElasticsearchSettings
import aws.sdk.kotlin.services.databasemigrationservice.model.GcpMySqlSettings
import aws.sdk.kotlin.services.databasemigrationservice.model.IbmDb2Settings
import aws.sdk.kotlin.services.databasemigrationservice.model.KafkaSettings
import aws.sdk.kotlin.services.databasemigrationservice.model.KinesisSettings
import aws.sdk.kotlin.services.databasemigrationservice.model.MicrosoftSqlServerSettings
import aws.sdk.kotlin.services.databasemigrationservice.model.ModifyEndpointRequest
import aws.sdk.kotlin.services.databasemigrationservice.model.MongoDbSettings
import aws.sdk.kotlin.services.databasemigrationservice.model.MySqlSettings
import aws.sdk.kotlin.services.databasemigrationservice.model.NeptuneSettings
import aws.sdk.kotlin.services.databasemigrationservice.model.OracleSettings
import aws.sdk.kotlin.services.databasemigrationservice.model.PostgreSqlSettings
import aws.sdk.kotlin.services.databasemigrationservice.model.RedisSettings
import aws.sdk.kotlin.services.databasemigrationservice.model.RedshiftSettings
import aws.sdk.kotlin.services.databasemigrationservice.model.ReplicationEndpointTypeValue
import aws.sdk.kotlin.services.databasemigrationservice.model.S3Settings
import aws.sdk.kotlin.services.databasemigrationservice.model.SybaseSettings
import aws.sdk.kotlin.services.databasemigrationservice.model.TimestreamSettings
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 ModifyEndpointOperationSerializer: HttpSerializer.NonStreaming {
override fun serialize(context: ExecutionContext, input: ModifyEndpointRequest): HttpRequestBuilder {
val builder = HttpRequestBuilder()
builder.method = HttpMethod.POST
builder.url {
path.encoded = "/"
}
val payload = serializeModifyEndpointOperationBody(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 serializeModifyEndpointOperationBody(context: ExecutionContext, input: ModifyEndpointRequest): ByteArray {
val serializer = JsonSerializer()
val CERTIFICATEARN_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("CertificateArn"))
val DATABASENAME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("DatabaseName"))
val DMSTRANSFERSETTINGS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("DmsTransferSettings"))
val DOCDBSETTINGS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("DocDbSettings"))
val DYNAMODBSETTINGS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("DynamoDbSettings"))
val ELASTICSEARCHSETTINGS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("ElasticsearchSettings"))
val ENDPOINTARN_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("EndpointArn"))
val ENDPOINTIDENTIFIER_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("EndpointIdentifier"))
val ENDPOINTTYPE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("EndpointType"))
val ENGINENAME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("EngineName"))
val EXACTSETTINGS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Boolean, JsonSerialName("ExactSettings"))
val EXTERNALTABLEDEFINITION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("ExternalTableDefinition"))
val EXTRACONNECTIONATTRIBUTES_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("ExtraConnectionAttributes"))
val GCPMYSQLSETTINGS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("GcpMySQLSettings"))
val IBMDB2SETTINGS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("IBMDb2Settings"))
val KAFKASETTINGS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("KafkaSettings"))
val KINESISSETTINGS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("KinesisSettings"))
val MICROSOFTSQLSERVERSETTINGS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("MicrosoftSQLServerSettings"))
val MONGODBSETTINGS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("MongoDbSettings"))
val MYSQLSETTINGS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("MySQLSettings"))
val NEPTUNESETTINGS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("NeptuneSettings"))
val ORACLESETTINGS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("OracleSettings"))
val PASSWORD_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("Password"))
val PORT_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Integer, JsonSerialName("Port"))
val POSTGRESQLSETTINGS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("PostgreSQLSettings"))
val REDISSETTINGS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("RedisSettings"))
val REDSHIFTSETTINGS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("RedshiftSettings"))
val S3SETTINGS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("S3Settings"))
val SERVERNAME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("ServerName"))
val SERVICEACCESSROLEARN_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("ServiceAccessRoleArn"))
val SSLMODE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("SslMode"))
val SYBASESETTINGS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("SybaseSettings"))
val TIMESTREAMSETTINGS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Struct, JsonSerialName("TimestreamSettings"))
val USERNAME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("Username"))
val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
field(CERTIFICATEARN_DESCRIPTOR)
field(DATABASENAME_DESCRIPTOR)
field(DMSTRANSFERSETTINGS_DESCRIPTOR)
field(DOCDBSETTINGS_DESCRIPTOR)
field(DYNAMODBSETTINGS_DESCRIPTOR)
field(ELASTICSEARCHSETTINGS_DESCRIPTOR)
field(ENDPOINTARN_DESCRIPTOR)
field(ENDPOINTIDENTIFIER_DESCRIPTOR)
field(ENDPOINTTYPE_DESCRIPTOR)
field(ENGINENAME_DESCRIPTOR)
field(EXACTSETTINGS_DESCRIPTOR)
field(EXTERNALTABLEDEFINITION_DESCRIPTOR)
field(EXTRACONNECTIONATTRIBUTES_DESCRIPTOR)
field(GCPMYSQLSETTINGS_DESCRIPTOR)
field(IBMDB2SETTINGS_DESCRIPTOR)
field(KAFKASETTINGS_DESCRIPTOR)
field(KINESISSETTINGS_DESCRIPTOR)
field(MICROSOFTSQLSERVERSETTINGS_DESCRIPTOR)
field(MONGODBSETTINGS_DESCRIPTOR)
field(MYSQLSETTINGS_DESCRIPTOR)
field(NEPTUNESETTINGS_DESCRIPTOR)
field(ORACLESETTINGS_DESCRIPTOR)
field(PASSWORD_DESCRIPTOR)
field(PORT_DESCRIPTOR)
field(POSTGRESQLSETTINGS_DESCRIPTOR)
field(REDISSETTINGS_DESCRIPTOR)
field(REDSHIFTSETTINGS_DESCRIPTOR)
field(S3SETTINGS_DESCRIPTOR)
field(SERVERNAME_DESCRIPTOR)
field(SERVICEACCESSROLEARN_DESCRIPTOR)
field(SSLMODE_DESCRIPTOR)
field(SYBASESETTINGS_DESCRIPTOR)
field(TIMESTREAMSETTINGS_DESCRIPTOR)
field(USERNAME_DESCRIPTOR)
}
serializer.serializeStruct(OBJ_DESCRIPTOR) {
input.certificateArn?.let { field(CERTIFICATEARN_DESCRIPTOR, it) }
input.databaseName?.let { field(DATABASENAME_DESCRIPTOR, it) }
input.dmsTransferSettings?.let { field(DMSTRANSFERSETTINGS_DESCRIPTOR, it, ::serializeDmsTransferSettingsDocument) }
input.docDbSettings?.let { field(DOCDBSETTINGS_DESCRIPTOR, it, ::serializeDocDbSettingsDocument) }
input.dynamoDbSettings?.let { field(DYNAMODBSETTINGS_DESCRIPTOR, it, ::serializeDynamoDbSettingsDocument) }
input.elasticsearchSettings?.let { field(ELASTICSEARCHSETTINGS_DESCRIPTOR, it, ::serializeElasticsearchSettingsDocument) }
input.endpointArn?.let { field(ENDPOINTARN_DESCRIPTOR, it) }
input.endpointIdentifier?.let { field(ENDPOINTIDENTIFIER_DESCRIPTOR, it) }
input.endpointType?.let { field(ENDPOINTTYPE_DESCRIPTOR, it.value) }
input.engineName?.let { field(ENGINENAME_DESCRIPTOR, it) }
input.exactSettings?.let { field(EXACTSETTINGS_DESCRIPTOR, it) }
input.externalTableDefinition?.let { field(EXTERNALTABLEDEFINITION_DESCRIPTOR, it) }
input.extraConnectionAttributes?.let { field(EXTRACONNECTIONATTRIBUTES_DESCRIPTOR, it) }
input.gcpMySqlSettings?.let { field(GCPMYSQLSETTINGS_DESCRIPTOR, it, ::serializeGcpMySqlSettingsDocument) }
input.ibmDb2Settings?.let { field(IBMDB2SETTINGS_DESCRIPTOR, it, ::serializeIbmDb2SettingsDocument) }
input.kafkaSettings?.let { field(KAFKASETTINGS_DESCRIPTOR, it, ::serializeKafkaSettingsDocument) }
input.kinesisSettings?.let { field(KINESISSETTINGS_DESCRIPTOR, it, ::serializeKinesisSettingsDocument) }
input.microsoftSqlServerSettings?.let { field(MICROSOFTSQLSERVERSETTINGS_DESCRIPTOR, it, ::serializeMicrosoftSqlServerSettingsDocument) }
input.mongoDbSettings?.let { field(MONGODBSETTINGS_DESCRIPTOR, it, ::serializeMongoDbSettingsDocument) }
input.mySqlSettings?.let { field(MYSQLSETTINGS_DESCRIPTOR, it, ::serializeMySqlSettingsDocument) }
input.neptuneSettings?.let { field(NEPTUNESETTINGS_DESCRIPTOR, it, ::serializeNeptuneSettingsDocument) }
input.oracleSettings?.let { field(ORACLESETTINGS_DESCRIPTOR, it, ::serializeOracleSettingsDocument) }
input.password?.let { field(PASSWORD_DESCRIPTOR, it) }
input.port?.let { field(PORT_DESCRIPTOR, it) }
input.postgreSqlSettings?.let { field(POSTGRESQLSETTINGS_DESCRIPTOR, it, ::serializePostgreSqlSettingsDocument) }
input.redisSettings?.let { field(REDISSETTINGS_DESCRIPTOR, it, ::serializeRedisSettingsDocument) }
input.redshiftSettings?.let { field(REDSHIFTSETTINGS_DESCRIPTOR, it, ::serializeRedshiftSettingsDocument) }
input.s3Settings?.let { field(S3SETTINGS_DESCRIPTOR, it, ::serializeS3SettingsDocument) }
input.serverName?.let { field(SERVERNAME_DESCRIPTOR, it) }
input.serviceAccessRoleArn?.let { field(SERVICEACCESSROLEARN_DESCRIPTOR, it) }
input.sslMode?.let { field(SSLMODE_DESCRIPTOR, it.value) }
input.sybaseSettings?.let { field(SYBASESETTINGS_DESCRIPTOR, it, ::serializeSybaseSettingsDocument) }
input.timestreamSettings?.let { field(TIMESTREAMSETTINGS_DESCRIPTOR, it, ::serializeTimestreamSettingsDocument) }
input.username?.let { field(USERNAME_DESCRIPTOR, it) }
}
return serializer.toByteArray()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy