commonMain.aws.sdk.kotlin.services.route53.serde.HealthCheckConfigDocumentDeserializer.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of route53-jvm Show documentation
Show all versions of route53-jvm Show documentation
The AWS SDK for Kotlin client for Route 53
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.route53.serde
import aws.sdk.kotlin.services.route53.model.HealthCheckConfig
import aws.sdk.kotlin.services.route53.model.HealthCheckType
import aws.sdk.kotlin.services.route53.model.InsufficientDataHealthStatus
import aws.smithy.kotlin.runtime.serde.getOrDeserializeErr
import aws.smithy.kotlin.runtime.serde.parse
import aws.smithy.kotlin.runtime.serde.parseBoolean
import aws.smithy.kotlin.runtime.serde.parseInt
import aws.smithy.kotlin.runtime.serde.xml.XmlTagReader
import aws.smithy.kotlin.runtime.serde.xml.tryData
internal fun deserializeHealthCheckConfigDocument(reader: XmlTagReader): HealthCheckConfig {
val builder = HealthCheckConfig.Builder()
loop@while (true) {
val curr = reader.nextTag() ?: break@loop
when (curr.tagName) {
// IPAddress com.amazonaws.route53#HealthCheckConfig$IPAddress
"IPAddress" -> builder.ipAddress = curr.tryData()
.getOrDeserializeErr { "expected (string: `com.amazonaws.route53#IPAddress`)" }
// Port com.amazonaws.route53#HealthCheckConfig$Port
"Port" -> builder.port = curr.tryData()
.parseInt()
.getOrDeserializeErr { "expected (integer: `com.amazonaws.route53#Port`)" }
// Type com.amazonaws.route53#HealthCheckConfig$Type
"Type" -> builder.type = curr.tryData()
.parse { HealthCheckType.fromValue(it) }
.getOrDeserializeErr { "expected (enum: `com.amazonaws.route53#HealthCheckType`)" }
// ResourcePath com.amazonaws.route53#HealthCheckConfig$ResourcePath
"ResourcePath" -> builder.resourcePath = curr.tryData()
.getOrDeserializeErr { "expected (string: `com.amazonaws.route53#ResourcePath`)" }
// FullyQualifiedDomainName com.amazonaws.route53#HealthCheckConfig$FullyQualifiedDomainName
"FullyQualifiedDomainName" -> builder.fullyQualifiedDomainName = curr.tryData()
.getOrDeserializeErr { "expected (string: `com.amazonaws.route53#FullyQualifiedDomainName`)" }
// SearchString com.amazonaws.route53#HealthCheckConfig$SearchString
"SearchString" -> builder.searchString = curr.tryData()
.getOrDeserializeErr { "expected (string: `com.amazonaws.route53#SearchString`)" }
// RequestInterval com.amazonaws.route53#HealthCheckConfig$RequestInterval
"RequestInterval" -> builder.requestInterval = curr.tryData()
.parseInt()
.getOrDeserializeErr { "expected (integer: `com.amazonaws.route53#RequestInterval`)" }
// FailureThreshold com.amazonaws.route53#HealthCheckConfig$FailureThreshold
"FailureThreshold" -> builder.failureThreshold = curr.tryData()
.parseInt()
.getOrDeserializeErr { "expected (integer: `com.amazonaws.route53#FailureThreshold`)" }
// MeasureLatency com.amazonaws.route53#HealthCheckConfig$MeasureLatency
"MeasureLatency" -> builder.measureLatency = curr.tryData()
.parseBoolean()
.getOrDeserializeErr { "expected (boolean: `com.amazonaws.route53#MeasureLatency`)" }
// Inverted com.amazonaws.route53#HealthCheckConfig$Inverted
"Inverted" -> builder.inverted = curr.tryData()
.parseBoolean()
.getOrDeserializeErr { "expected (boolean: `com.amazonaws.route53#Inverted`)" }
// Disabled com.amazonaws.route53#HealthCheckConfig$Disabled
"Disabled" -> builder.disabled = curr.tryData()
.parseBoolean()
.getOrDeserializeErr { "expected (boolean: `com.amazonaws.route53#Disabled`)" }
// HealthThreshold com.amazonaws.route53#HealthCheckConfig$HealthThreshold
"HealthThreshold" -> builder.healthThreshold = curr.tryData()
.parseInt()
.getOrDeserializeErr { "expected (integer: `com.amazonaws.route53#HealthThreshold`)" }
// ChildHealthChecks com.amazonaws.route53#HealthCheckConfig$ChildHealthChecks
"ChildHealthChecks" -> builder.childHealthChecks = deserializeChildHealthCheckListShape(curr)
// EnableSNI com.amazonaws.route53#HealthCheckConfig$EnableSNI
"EnableSNI" -> builder.enableSni = curr.tryData()
.parseBoolean()
.getOrDeserializeErr { "expected (boolean: `com.amazonaws.route53#EnableSNI`)" }
// Regions com.amazonaws.route53#HealthCheckConfig$Regions
"Regions" -> builder.regions = deserializeHealthCheckRegionListShape(curr)
// AlarmIdentifier com.amazonaws.route53#HealthCheckConfig$AlarmIdentifier
"AlarmIdentifier" -> builder.alarmIdentifier = deserializeAlarmIdentifierDocument(curr)
// InsufficientDataHealthStatus com.amazonaws.route53#HealthCheckConfig$InsufficientDataHealthStatus
"InsufficientDataHealthStatus" -> builder.insufficientDataHealthStatus = curr.tryData()
.parse { InsufficientDataHealthStatus.fromValue(it) }
.getOrDeserializeErr { "expected (enum: `com.amazonaws.route53#InsufficientDataHealthStatus`)" }
// RoutingControlArn com.amazonaws.route53#HealthCheckConfig$RoutingControlArn
"RoutingControlArn" -> builder.routingControlArn = curr.tryData()
.getOrDeserializeErr { "expected (string: `com.amazonaws.route53#RoutingControlArn`)" }
else -> {}
}
curr.drop()
}
builder.correctErrors()
return builder.build()
}