commonMain.aws.sdk.kotlin.services.signer.serde.GetRevocationStatusOperationSerializer.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.signer.serde
import aws.sdk.kotlin.services.signer.model.GetRevocationStatusRequest
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.text.encoding.PercentEncoding
import aws.smithy.kotlin.runtime.time.Instant
import aws.smithy.kotlin.runtime.time.TimestampFormat
internal class GetRevocationStatusOperationSerializer: HttpSerializer.NonStreaming {
override fun serialize(context: ExecutionContext, input: GetRevocationStatusRequest): HttpRequestBuilder {
val builder = HttpRequestBuilder()
builder.method = HttpMethod.GET
builder.url {
path.encoded = "/revocations"
parameters.decodedParameters(PercentEncoding.SmithyLabel) {
if (input.certificateHashes?.isNotEmpty() == true) addAll("certificateHashes", input.certificateHashes)
if (input.jobArn != null) add("jobArn", input.jobArn)
if (input.platformId != null) add("platformId", input.platformId)
if (input.profileVersionArn != null) add("profileVersionArn", input.profileVersionArn)
if (input.signatureTimestamp != null) add("signatureTimestamp", input.signatureTimestamp.format(TimestampFormat.ISO_8601))
}
}
return builder
}
}