commonMain.aws.sdk.kotlin.services.databasemigrationservice.serde.EndpointDocumentDeserializer.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.Endpoint
import aws.sdk.kotlin.services.databasemigrationservice.model.ReplicationEndpointTypeValue
import aws.smithy.kotlin.runtime.serde.Deserializer
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.serializeList
import aws.smithy.kotlin.runtime.serde.serializeMap
import aws.smithy.kotlin.runtime.serde.serializeStruct
internal fun deserializeEndpointDocument(deserializer: Deserializer): Endpoint {
val builder = Endpoint.Builder()
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 ENGINEDISPLAYNAME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("EngineDisplayName"))
val ENGINENAME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("EngineName"))
val EXTERNALID_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("ExternalId"))
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 KMSKEYID_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("KmsKeyId"))
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 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 STATUS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("Status"))
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(ENGINEDISPLAYNAME_DESCRIPTOR)
field(ENGINENAME_DESCRIPTOR)
field(EXTERNALID_DESCRIPTOR)
field(EXTERNALTABLEDEFINITION_DESCRIPTOR)
field(EXTRACONNECTIONATTRIBUTES_DESCRIPTOR)
field(GCPMYSQLSETTINGS_DESCRIPTOR)
field(IBMDB2SETTINGS_DESCRIPTOR)
field(KAFKASETTINGS_DESCRIPTOR)
field(KINESISSETTINGS_DESCRIPTOR)
field(KMSKEYID_DESCRIPTOR)
field(MICROSOFTSQLSERVERSETTINGS_DESCRIPTOR)
field(MONGODBSETTINGS_DESCRIPTOR)
field(MYSQLSETTINGS_DESCRIPTOR)
field(NEPTUNESETTINGS_DESCRIPTOR)
field(ORACLESETTINGS_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(STATUS_DESCRIPTOR)
field(SYBASESETTINGS_DESCRIPTOR)
field(TIMESTREAMSETTINGS_DESCRIPTOR)
field(USERNAME_DESCRIPTOR)
}
deserializer.deserializeStruct(OBJ_DESCRIPTOR) {
loop@while (true) {
when (findNextFieldIndex()) {
CERTIFICATEARN_DESCRIPTOR.index -> builder.certificateArn = deserializeString()
DATABASENAME_DESCRIPTOR.index -> builder.databaseName = deserializeString()
DMSTRANSFERSETTINGS_DESCRIPTOR.index -> builder.dmsTransferSettings = deserializeDmsTransferSettingsDocument(deserializer)
DOCDBSETTINGS_DESCRIPTOR.index -> builder.docDbSettings = deserializeDocDbSettingsDocument(deserializer)
DYNAMODBSETTINGS_DESCRIPTOR.index -> builder.dynamoDbSettings = deserializeDynamoDbSettingsDocument(deserializer)
ELASTICSEARCHSETTINGS_DESCRIPTOR.index -> builder.elasticsearchSettings = deserializeElasticsearchSettingsDocument(deserializer)
ENDPOINTARN_DESCRIPTOR.index -> builder.endpointArn = deserializeString()
ENDPOINTIDENTIFIER_DESCRIPTOR.index -> builder.endpointIdentifier = deserializeString()
ENDPOINTTYPE_DESCRIPTOR.index -> builder.endpointType = deserializeString().let { ReplicationEndpointTypeValue.fromValue(it) }
ENGINEDISPLAYNAME_DESCRIPTOR.index -> builder.engineDisplayName = deserializeString()
ENGINENAME_DESCRIPTOR.index -> builder.engineName = deserializeString()
EXTERNALID_DESCRIPTOR.index -> builder.externalId = deserializeString()
EXTERNALTABLEDEFINITION_DESCRIPTOR.index -> builder.externalTableDefinition = deserializeString()
EXTRACONNECTIONATTRIBUTES_DESCRIPTOR.index -> builder.extraConnectionAttributes = deserializeString()
GCPMYSQLSETTINGS_DESCRIPTOR.index -> builder.gcpMySqlSettings = deserializeGcpMySqlSettingsDocument(deserializer)
IBMDB2SETTINGS_DESCRIPTOR.index -> builder.ibmDb2Settings = deserializeIbmDb2SettingsDocument(deserializer)
KAFKASETTINGS_DESCRIPTOR.index -> builder.kafkaSettings = deserializeKafkaSettingsDocument(deserializer)
KINESISSETTINGS_DESCRIPTOR.index -> builder.kinesisSettings = deserializeKinesisSettingsDocument(deserializer)
KMSKEYID_DESCRIPTOR.index -> builder.kmsKeyId = deserializeString()
MICROSOFTSQLSERVERSETTINGS_DESCRIPTOR.index -> builder.microsoftSqlServerSettings = deserializeMicrosoftSqlServerSettingsDocument(deserializer)
MONGODBSETTINGS_DESCRIPTOR.index -> builder.mongoDbSettings = deserializeMongoDbSettingsDocument(deserializer)
MYSQLSETTINGS_DESCRIPTOR.index -> builder.mySqlSettings = deserializeMySqlSettingsDocument(deserializer)
NEPTUNESETTINGS_DESCRIPTOR.index -> builder.neptuneSettings = deserializeNeptuneSettingsDocument(deserializer)
ORACLESETTINGS_DESCRIPTOR.index -> builder.oracleSettings = deserializeOracleSettingsDocument(deserializer)
PORT_DESCRIPTOR.index -> builder.port = deserializeInt()
POSTGRESQLSETTINGS_DESCRIPTOR.index -> builder.postgreSqlSettings = deserializePostgreSqlSettingsDocument(deserializer)
REDISSETTINGS_DESCRIPTOR.index -> builder.redisSettings = deserializeRedisSettingsDocument(deserializer)
REDSHIFTSETTINGS_DESCRIPTOR.index -> builder.redshiftSettings = deserializeRedshiftSettingsDocument(deserializer)
S3SETTINGS_DESCRIPTOR.index -> builder.s3Settings = deserializeS3SettingsDocument(deserializer)
SERVERNAME_DESCRIPTOR.index -> builder.serverName = deserializeString()
SERVICEACCESSROLEARN_DESCRIPTOR.index -> builder.serviceAccessRoleArn = deserializeString()
SSLMODE_DESCRIPTOR.index -> builder.sslMode = deserializeString().let { DmsSslModeValue.fromValue(it) }
STATUS_DESCRIPTOR.index -> builder.status = deserializeString()
SYBASESETTINGS_DESCRIPTOR.index -> builder.sybaseSettings = deserializeSybaseSettingsDocument(deserializer)
TIMESTREAMSETTINGS_DESCRIPTOR.index -> builder.timestreamSettings = deserializeTimestreamSettingsDocument(deserializer)
USERNAME_DESCRIPTOR.index -> builder.username = deserializeString()
null -> break@loop
else -> skipValue()
}
}
}
builder.correctErrors()
return builder.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy