commonMain.aws.sdk.kotlin.services.glue.serde.DevEndpointDocumentDeserializer.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of glue-jvm Show documentation
Show all versions of glue-jvm Show documentation
The AWS SDK for Kotlin client for Glue
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.glue.serde
import aws.sdk.kotlin.services.glue.model.DevEndpoint
import aws.sdk.kotlin.services.glue.model.WorkerType
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
import aws.smithy.kotlin.runtime.time.Instant
import aws.smithy.kotlin.runtime.time.TimestampFormat
import kotlin.collections.mutableListOf
import kotlin.collections.mutableMapOf
internal fun deserializeDevEndpointDocument(deserializer: Deserializer): DevEndpoint {
val builder = DevEndpoint.Builder()
val ARGUMENTS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Map, JsonSerialName("Arguments"))
val AVAILABILITYZONE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("AvailabilityZone"))
val CREATEDTIMESTAMP_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Timestamp, JsonSerialName("CreatedTimestamp"))
val ENDPOINTNAME_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("EndpointName"))
val EXTRAJARSS3PATH_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("ExtraJarsS3Path"))
val EXTRAPYTHONLIBSS3PATH_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("ExtraPythonLibsS3Path"))
val FAILUREREASON_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("FailureReason"))
val GLUEVERSION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("GlueVersion"))
val LASTMODIFIEDTIMESTAMP_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Timestamp, JsonSerialName("LastModifiedTimestamp"))
val LASTUPDATESTATUS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("LastUpdateStatus"))
val NUMBEROFNODES_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Integer, JsonSerialName("NumberOfNodes"))
val NUMBEROFWORKERS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Integer, JsonSerialName("NumberOfWorkers"))
val PRIVATEADDRESS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("PrivateAddress"))
val PUBLICADDRESS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("PublicAddress"))
val PUBLICKEY_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("PublicKey"))
val PUBLICKEYS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.List, JsonSerialName("PublicKeys"))
val ROLEARN_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("RoleArn"))
val SECURITYCONFIGURATION_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("SecurityConfiguration"))
val SECURITYGROUPIDS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.List, JsonSerialName("SecurityGroupIds"))
val STATUS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("Status"))
val SUBNETID_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("SubnetId"))
val VPCID_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("VpcId"))
val WORKERTYPE_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Enum, JsonSerialName("WorkerType"))
val YARNENDPOINTADDRESS_DESCRIPTOR = SdkFieldDescriptor(SerialKind.String, JsonSerialName("YarnEndpointAddress"))
val ZEPPELINREMOTESPARKINTERPRETERPORT_DESCRIPTOR = SdkFieldDescriptor(SerialKind.Integer, JsonSerialName("ZeppelinRemoteSparkInterpreterPort"))
val OBJ_DESCRIPTOR = SdkObjectDescriptor.build {
field(ARGUMENTS_DESCRIPTOR)
field(AVAILABILITYZONE_DESCRIPTOR)
field(CREATEDTIMESTAMP_DESCRIPTOR)
field(ENDPOINTNAME_DESCRIPTOR)
field(EXTRAJARSS3PATH_DESCRIPTOR)
field(EXTRAPYTHONLIBSS3PATH_DESCRIPTOR)
field(FAILUREREASON_DESCRIPTOR)
field(GLUEVERSION_DESCRIPTOR)
field(LASTMODIFIEDTIMESTAMP_DESCRIPTOR)
field(LASTUPDATESTATUS_DESCRIPTOR)
field(NUMBEROFNODES_DESCRIPTOR)
field(NUMBEROFWORKERS_DESCRIPTOR)
field(PRIVATEADDRESS_DESCRIPTOR)
field(PUBLICADDRESS_DESCRIPTOR)
field(PUBLICKEY_DESCRIPTOR)
field(PUBLICKEYS_DESCRIPTOR)
field(ROLEARN_DESCRIPTOR)
field(SECURITYCONFIGURATION_DESCRIPTOR)
field(SECURITYGROUPIDS_DESCRIPTOR)
field(STATUS_DESCRIPTOR)
field(SUBNETID_DESCRIPTOR)
field(VPCID_DESCRIPTOR)
field(WORKERTYPE_DESCRIPTOR)
field(YARNENDPOINTADDRESS_DESCRIPTOR)
field(ZEPPELINREMOTESPARKINTERPRETERPORT_DESCRIPTOR)
}
deserializer.deserializeStruct(OBJ_DESCRIPTOR) {
loop@while (true) {
when (findNextFieldIndex()) {
ARGUMENTS_DESCRIPTOR.index -> builder.arguments =
deserializer.deserializeMap(ARGUMENTS_DESCRIPTOR) {
val map0 = mutableMapOf()
while (hasNextEntry()) {
val k0 = key()
val v0 = if (nextHasValue()) { deserializeString() } else { deserializeNull(); continue }
map0[k0] = v0
}
map0
}
AVAILABILITYZONE_DESCRIPTOR.index -> builder.availabilityZone = deserializeString()
CREATEDTIMESTAMP_DESCRIPTOR.index -> builder.createdTimestamp = deserializeInstant(TimestampFormat.EPOCH_SECONDS)
ENDPOINTNAME_DESCRIPTOR.index -> builder.endpointName = deserializeString()
EXTRAJARSS3PATH_DESCRIPTOR.index -> builder.extraJarsS3Path = deserializeString()
EXTRAPYTHONLIBSS3PATH_DESCRIPTOR.index -> builder.extraPythonLibsS3Path = deserializeString()
FAILUREREASON_DESCRIPTOR.index -> builder.failureReason = deserializeString()
GLUEVERSION_DESCRIPTOR.index -> builder.glueVersion = deserializeString()
LASTMODIFIEDTIMESTAMP_DESCRIPTOR.index -> builder.lastModifiedTimestamp = deserializeInstant(TimestampFormat.EPOCH_SECONDS)
LASTUPDATESTATUS_DESCRIPTOR.index -> builder.lastUpdateStatus = deserializeString()
NUMBEROFNODES_DESCRIPTOR.index -> builder.numberOfNodes = deserializeInt()
NUMBEROFWORKERS_DESCRIPTOR.index -> builder.numberOfWorkers = deserializeInt()
PRIVATEADDRESS_DESCRIPTOR.index -> builder.privateAddress = deserializeString()
PUBLICADDRESS_DESCRIPTOR.index -> builder.publicAddress = deserializeString()
PUBLICKEY_DESCRIPTOR.index -> builder.publicKey = deserializeString()
PUBLICKEYS_DESCRIPTOR.index -> builder.publicKeys =
deserializer.deserializeList(PUBLICKEYS_DESCRIPTOR) {
val col0 = mutableListOf()
while (hasNextElement()) {
val el0 = if (nextHasValue()) { deserializeString() } else { deserializeNull(); continue }
col0.add(el0)
}
col0
}
ROLEARN_DESCRIPTOR.index -> builder.roleArn = deserializeString()
SECURITYCONFIGURATION_DESCRIPTOR.index -> builder.securityConfiguration = deserializeString()
SECURITYGROUPIDS_DESCRIPTOR.index -> builder.securityGroupIds =
deserializer.deserializeList(SECURITYGROUPIDS_DESCRIPTOR) {
val col0 = mutableListOf()
while (hasNextElement()) {
val el0 = if (nextHasValue()) { deserializeString() } else { deserializeNull(); continue }
col0.add(el0)
}
col0
}
STATUS_DESCRIPTOR.index -> builder.status = deserializeString()
SUBNETID_DESCRIPTOR.index -> builder.subnetId = deserializeString()
VPCID_DESCRIPTOR.index -> builder.vpcId = deserializeString()
WORKERTYPE_DESCRIPTOR.index -> builder.workerType = deserializeString().let { WorkerType.fromValue(it) }
YARNENDPOINTADDRESS_DESCRIPTOR.index -> builder.yarnEndpointAddress = deserializeString()
ZEPPELINREMOTESPARKINTERPRETERPORT_DESCRIPTOR.index -> builder.zeppelinRemoteSparkInterpreterPort = deserializeInt()
null -> break@loop
else -> skipValue()
}
}
}
builder.correctErrors()
return builder.build()
}