
commonMain.aws.sdk.kotlin.services.chimesdkmessaging.serde.DescribeChannelMembershipForAppInstanceUserOperationSerializer.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.chimesdkmessaging.serde
import aws.sdk.kotlin.services.chimesdkmessaging.model.DescribeChannelMembershipForAppInstanceUserRequest
import aws.smithy.kotlin.runtime.http.HttpBody
import aws.smithy.kotlin.runtime.http.HttpMethod
import aws.smithy.kotlin.runtime.http.operation.HttpSerialize
import aws.smithy.kotlin.runtime.http.request.HttpRequestBuilder
import aws.smithy.kotlin.runtime.http.request.headers
import aws.smithy.kotlin.runtime.http.request.url
import aws.smithy.kotlin.runtime.operation.ExecutionContext
import aws.smithy.kotlin.runtime.text.encoding.PercentEncoding
internal class DescribeChannelMembershipForAppInstanceUserOperationSerializer: HttpSerialize {
override suspend fun serialize(context: ExecutionContext, input: DescribeChannelMembershipForAppInstanceUserRequest): HttpRequestBuilder {
val builder = HttpRequestBuilder()
builder.method = HttpMethod.GET
builder.url {
requireNotNull(input.channelArn) { "channelArn is bound to the URI and must not be null" }
path.encodedSegments {
add(PercentEncoding.Path.encode("channels"))
add(PercentEncoding.SmithyLabel.encode("${input.channelArn}"))
}
parameters.decodedParameters {
add("scope", "app-instance-user-membership")
}
parameters.decodedParameters(PercentEncoding.SmithyLabel) {
if (input.appInstanceUserArn != null) add("app-instance-user-arn", input.appInstanceUserArn)
}
}
builder.headers {
if (input.chimeBearer?.isNotEmpty() == true) append("x-amz-chime-bearer", input.chimeBearer)
}
return builder
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy